Skip to content

Commit

Permalink
Merge pull request Expensify#37692 from andreasnw/fix/37248-maximum_z…
Browse files Browse the repository at this point in the history
…oom_applied_after_zooming_out

fix: resetting pinchScale.value to 1 when double tap performed
  • Loading branch information
youssef-lr authored Mar 5, 2024
2 parents a8ece90 + 2d58ee2 commit e7a067d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/MultiGestureCanvas/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,11 @@ function MultiGestureCanvas({
const reset = useWorkletCallback((animated: boolean, callback?: () => void) => {
stopAnimation();

offsetX.value = 0;
offsetY.value = 0;
pinchScale.value = 1;

if (animated) {
offsetX.value = 0;
offsetY.value = 0;
panTranslateX.value = withSpring(0, SPRING_CONFIG);
panTranslateY.value = withSpring(0, SPRING_CONFIG);
pinchTranslateX.value = withSpring(0, SPRING_CONFIG);
Expand All @@ -128,8 +130,6 @@ function MultiGestureCanvas({
return;
}

offsetX.value = 0;
offsetY.value = 0;
panTranslateX.value = 0;
panTranslateY.value = 0;
pinchTranslateX.value = 0;
Expand Down

0 comments on commit e7a067d

Please sign in to comment.