From 06ac7bc554b7134939a31c3265091b07be41d271 Mon Sep 17 00:00:00 2001 From: Inbal Tish Date: Mon, 24 Dec 2018 09:43:10 +0200 Subject: [PATCH] disabling and enabling gesture recogniser before snapTo --- .../src/main/java/com/wix/interactable/InteractableView.java | 3 +++ lib/ios/Interactable/InteractableView.m | 2 ++ 2 files changed, 5 insertions(+) diff --git a/lib/android/src/main/java/com/wix/interactable/InteractableView.java b/lib/android/src/main/java/com/wix/interactable/InteractableView.java index feacd5cb..a5bf9ceb 100644 --- a/lib/android/src/main/java/com/wix/interactable/InteractableView.java +++ b/lib/android/src/main/java/com/wix/interactable/InteractableView.java @@ -541,6 +541,9 @@ public void snapTo(int index) { { this.animator.removeTempBehaviors(); this.dragBehavior = null; + setDragEnabled(false); + setDragEnabled(true); + InteractablePoint snapPoint = snapPoints.get(index); addTempSnapToPointBehavior(snapPoint); addTempBounceBehaviorWithBoundaries(this.boundaries); diff --git a/lib/ios/Interactable/InteractableView.m b/lib/ios/Interactable/InteractableView.m index d413a5da..1b385f13 100644 --- a/lib/ios/Interactable/InteractableView.m +++ b/lib/ios/Interactable/InteractableView.m @@ -605,6 +605,8 @@ - (void)snapTo:(NSDictionary*)params { [self.animator removeTempBehaviors]; self.dragBehavior = nil; + self.pan.enabled = NO; + self.pan.enabled = YES; InteractablePoint *snapPoint = [self.snapPoints objectAtIndex:index]; if (snapPoint) {