From 3427cb84422ef0b9410c1603ba1eb18d9d88bc74 Mon Sep 17 00:00:00 2001 From: Simon Jackson Date: Fri, 25 Sep 2020 14:40:59 +0100 Subject: [PATCH 1/2] Fixed hard swipe to ensur eit only ever moves one page, no matter how far you swipe. Resolves #344 --- Runtime/Scripts/Layout/HorizontalScrollSnap.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Runtime/Scripts/Layout/HorizontalScrollSnap.cs b/Runtime/Scripts/Layout/HorizontalScrollSnap.cs index 45a69cb..f533370 100644 --- a/Runtime/Scripts/Layout/HorizontalScrollSnap.cs +++ b/Runtime/Scripts/Layout/HorizontalScrollSnap.cs @@ -45,6 +45,8 @@ namespace UnityEngine.UI.Extensions } } + if (UseHardSwipe) return; + CurrentPage = GetPageforPosition(_screensContainer.anchoredPosition); //If the container is moving check if it needs to settle on a page From 2c2a605f797619d05557702080b3ba83dc4b26e2 Mon Sep 17 00:00:00 2001 From: "Simon (darkside) Jackson" Date: Fri, 25 Sep 2020 16:02:03 +0100 Subject: [PATCH 2/2] Fixing Vertical snap too --- Runtime/Scripts/Layout/VerticalScrollSnap.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Runtime/Scripts/Layout/VerticalScrollSnap.cs b/Runtime/Scripts/Layout/VerticalScrollSnap.cs index 87f7d32..a8228d8 100644 --- a/Runtime/Scripts/Layout/VerticalScrollSnap.cs +++ b/Runtime/Scripts/Layout/VerticalScrollSnap.cs @@ -45,6 +45,8 @@ namespace UnityEngine.UI.Extensions } } + if (UseHardSwipe) return; + CurrentPage = GetPageforPosition(_screensContainer.anchoredPosition); //If the container is moving check if it needs to settle on a page