From 806b1e9705b8d5f8717f56ff8c3963f8c56c37a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=C5=A1t=20Pleskot?= Date: Sun, 3 Sep 2023 16:54:04 +0200 Subject: [PATCH] fix: prevent viewport jumping when panning by mouse wheel --- src/components/App.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/App.tsx b/src/components/App.tsx index 1f81a2fc88..2cc98c494a 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -2055,6 +2055,7 @@ class App extends React.Component { shouldAnimate: isViewportOutsideOfConstrainedArea && this.state.cursorButton !== "down" && + prevState.cursorButton === "down" && prevState.zoom.value === this.state.zoom.value && elementsIncludingDeleted.length > 0, // Do not animate when app is initialized but scene is empty - this would cause flickering });