From c8de1b928992df29cb345528bb55f0c6eefce36e Mon Sep 17 00:00:00 2001 From: Johannes Deml Date: Wed, 2 Aug 2017 11:57:02 +0200 Subject: [PATCH] FIX fastswipe threshold Does now what is stated it does in the tooltip: Offset for how far a swipe has to travel to initiate a page change (optional) --- Scripts/Layout/HorizontalScrollSnap.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Layout/HorizontalScrollSnap.cs b/Scripts/Layout/HorizontalScrollSnap.cs index 3fe3cfe..f3c01a0 100644 --- a/Scripts/Layout/HorizontalScrollSnap.cs +++ b/Scripts/Layout/HorizontalScrollSnap.cs @@ -236,7 +236,7 @@ namespace UnityEngine.UI.Extensions if (_scroll_rect.horizontal) { var distance = Vector3.Distance(_startPosition, _screensContainer.localPosition); - if (UseFastSwipe && distance < panelDimensions.width + FastSwipeThreshold && distance >=1f) + if (UseFastSwipe && distance < panelDimensions.width && distance >= FastSwipeThreshold) { _scroll_rect.velocity = Vector3.zero; if (_startPosition.x - _screensContainer.localPosition.x > 0)