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)
release
Johannes Deml 2017-08-02 11:57:02 +02:00
parent 603d85126f
commit c8de1b9289
1 changed files with 1 additions and 1 deletions

View File

@ -236,7 +236,7 @@ namespace UnityEngine.UI.Extensions
if (_scroll_rect.horizontal) if (_scroll_rect.horizontal)
{ {
var distance = Vector3.Distance(_startPosition, _screensContainer.localPosition); 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; _scroll_rect.velocity = Vector3.zero;
if (_startPosition.x - _screensContainer.localPosition.x > 0) if (_startPosition.x - _screensContainer.localPosition.x > 0)