From bf6d0eeef7ea73525484fe680fd72f46ab490d51 Mon Sep 17 00:00:00 2001 From: zsviczian Date: Tue, 12 Apr 2022 12:39:28 +0200 Subject: [PATCH] fix: Pinch zoom in view mode (#5001) --- src/components/App.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index 8a0a5643..9a84579c 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -2937,6 +2937,8 @@ class App extends React.Component { }); this.savePointer(event.clientX, event.clientY, "down"); + this.updateGestureOnPointerDown(event); + if (this.handleCanvasPanUsingWheelOrSpaceDrag(event)) { return; } @@ -2949,8 +2951,6 @@ class App extends React.Component { return; } - this.updateGestureOnPointerDown(event); - // don't select while panning if (gesture.pointers.size > 1) { return; @@ -3128,7 +3128,7 @@ class App extends React.Component { ): boolean => { if ( !( - gesture.pointers.size === 0 && + gesture.pointers.size <= 1 && (event.button === POINTER_BUTTON.WHEEL || (event.button === POINTER_BUTTON.MAIN && isHoldingSpace) || this.state.viewModeEnabled)