From 9964278fbe173655347096347c4c827d0573a350 Mon Sep 17 00:00:00 2001 From: andreasnw Date: Tue, 6 Feb 2024 22:44:04 +0700 Subject: [PATCH 1/2] fix: remove animation for offsetY.value --- src/components/MultiGestureCanvas/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MultiGestureCanvas/index.tsx b/src/components/MultiGestureCanvas/index.tsx index a7eca6baa18f..e889fe773f0f 100644 --- a/src/components/MultiGestureCanvas/index.tsx +++ b/src/components/MultiGestureCanvas/index.tsx @@ -130,7 +130,7 @@ function MultiGestureCanvas({ if (animated) { offsetX.value = withSpring(0, SPRING_CONFIG); - offsetY.value = withSpring(0, SPRING_CONFIG); + offsetY.value = 0; panTranslateX.value = withSpring(0, SPRING_CONFIG); panTranslateY.value = withSpring(0, SPRING_CONFIG); pinchTranslateX.value = withSpring(0, SPRING_CONFIG); From 6cb78bb0ab1c26f0d10ba5130b311ece7cac9cba Mon Sep 17 00:00:00 2001 From: Andreas Nandiwardhana Date: Wed, 14 Feb 2024 10:31:37 +0700 Subject: [PATCH 2/2] fix: horizontal image cases remove animation from offestX.value to handle horizontal image cases --- src/components/MultiGestureCanvas/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MultiGestureCanvas/index.tsx b/src/components/MultiGestureCanvas/index.tsx index e889fe773f0f..7e3512757b2a 100644 --- a/src/components/MultiGestureCanvas/index.tsx +++ b/src/components/MultiGestureCanvas/index.tsx @@ -129,7 +129,7 @@ function MultiGestureCanvas({ pinchScale.value = 1; if (animated) { - offsetX.value = withSpring(0, SPRING_CONFIG); + offsetX.value = 0; offsetY.value = 0; panTranslateX.value = withSpring(0, SPRING_CONFIG); panTranslateY.value = withSpring(0, SPRING_CONFIG);