Fix middle mouse panning on windows (#2172)

This commit is contained in:
Pete Hunt 2020-09-21 01:15:40 -07:00 committed by GitHub
parent c814917927
commit e3f3427b31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3781,6 +3781,11 @@ class App extends React.Component<ExcalidrawProps, AppState> {
private handleWheel = withBatchedUpdates((event: WheelEvent) => { private handleWheel = withBatchedUpdates((event: WheelEvent) => {
event.preventDefault(); event.preventDefault();
if (isPanning) {
return;
}
const { deltaX, deltaY } = event; const { deltaX, deltaY } = event;
const { selectedElementIds, previousSelectedElementIds } = this.state; const { selectedElementIds, previousSelectedElementIds } = this.state;