From e7babe0dd6b3d5c63fb88d53c86e2605e741737b Mon Sep 17 00:00:00 2001 From: SimonDarksideJ Date: Sat, 17 Jun 2023 17:16:31 +0100 Subject: [PATCH] Updated HSS/VSS to ensure events fire correctly if the control is dragged but not moved: Resolves: #186 --- Runtime/Scripts/Layout/HorizontalScrollSnap.cs | 4 ++++ Runtime/Scripts/Layout/VerticalScrollSnap.cs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Runtime/Scripts/Layout/HorizontalScrollSnap.cs b/Runtime/Scripts/Layout/HorizontalScrollSnap.cs index 9fc2a4c..846d2a3 100644 --- a/Runtime/Scripts/Layout/HorizontalScrollSnap.cs +++ b/Runtime/Scripts/Layout/HorizontalScrollSnap.cs @@ -328,6 +328,10 @@ namespace UnityEngine.UI.Extensions } } } + else if (distance == 0) + { + EndScreenChange(); + } } } } diff --git a/Runtime/Scripts/Layout/VerticalScrollSnap.cs b/Runtime/Scripts/Layout/VerticalScrollSnap.cs index 2b4fe70..8690856 100644 --- a/Runtime/Scripts/Layout/VerticalScrollSnap.cs +++ b/Runtime/Scripts/Layout/VerticalScrollSnap.cs @@ -321,6 +321,10 @@ namespace UnityEngine.UI.Extensions } } } + else if (distance == 0) + { + EndScreenChange(); + } } } }