mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
fix horizontal scroll via shift+wheel on mac (#1528)
This commit is contained in:
parent
32e56aba3e
commit
4aa1784ba3
1 changed files with 2 additions and 1 deletions
|
@ -2570,7 +2570,8 @@ class App extends React.Component<any, AppState> {
|
|||
// scroll horizontally when shift pressed
|
||||
if (event.shiftKey) {
|
||||
this.setState(({ zoom, scrollX }) => ({
|
||||
scrollX: normalizeScroll(scrollX - deltaY / zoom),
|
||||
// on Mac, shift+wheel tends to result in deltaX
|
||||
scrollX: normalizeScroll(scrollX - (deltaY || deltaX) / zoom),
|
||||
}));
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue