mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: prevent viewport jumping when panning by mouse wheel
This commit is contained in:
parent
b0cdd00c2a
commit
806b1e9705
1 changed files with 1 additions and 0 deletions
|
@ -2055,6 +2055,7 @@ class App extends React.Component<AppProps, AppState> {
|
|||
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
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue