From 3427cb84422ef0b9410c1603ba1eb18d9d88bc74 Mon Sep 17 00:00:00 2001 From: Simon Jackson Date: Fri, 25 Sep 2020 14:40:59 +0100 Subject: [PATCH] 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