scroll horizontally on shift-scroll (#1519)
This commit is contained in:
parent
51f8146357
commit
b7a37c157b
@ -2567,6 +2567,14 @@ class App extends React.Component<any, AppState> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// scroll horizontally when shift pressed
|
||||||
|
if (event.shiftKey) {
|
||||||
|
this.setState(({ zoom, scrollX }) => ({
|
||||||
|
scrollX: normalizeScroll(scrollX - deltaY / zoom),
|
||||||
|
}));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.setState(({ zoom, scrollX, scrollY }) => ({
|
this.setState(({ zoom, scrollX, scrollY }) => ({
|
||||||
scrollX: normalizeScroll(scrollX - deltaX / zoom),
|
scrollX: normalizeScroll(scrollX - deltaX / zoom),
|
||||||
scrollY: normalizeScroll(scrollY - deltaY / zoom),
|
scrollY: normalizeScroll(scrollY - deltaY / zoom),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user