Navigation fixes
This commit is contained in:
@@ -120,7 +120,9 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function handleShortcuts(event: KeyboardEvent & { currentTarget: EventTarget & Window }) {
|
function handleShortcuts(event: KeyboardEvent & { currentTarget: EventTarget & Window }) {
|
||||||
switch (event.code) {
|
const action = event.code || event.key;
|
||||||
|
|
||||||
|
switch (action) {
|
||||||
case 'ArrowLeft':
|
case 'ArrowLeft':
|
||||||
case 'ArrowUp':
|
case 'ArrowUp':
|
||||||
case 'PageUp':
|
case 'PageUp':
|
||||||
@@ -213,7 +215,7 @@
|
|||||||
|
|
||||||
<svelte:window
|
<svelte:window
|
||||||
on:resize={zoomDefault}
|
on:resize={zoomDefault}
|
||||||
on:keyup|preventDefault={handleShortcuts}
|
on:keyup={handleShortcuts}
|
||||||
on:touchstart={handleTouchStart}
|
on:touchstart={handleTouchStart}
|
||||||
on:touchend={handlePointerUp}
|
on:touchend={handlePointerUp}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -83,7 +83,9 @@ export function panAlign(alignX: PanX, alignY: PanY) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
pz?.moveTo(x, y);
|
pz.pause();
|
||||||
|
pz.moveTo(x, y);
|
||||||
|
pz.resume();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function zoomOriginal() {
|
export function zoomOriginal() {
|
||||||
|
|||||||
Reference in New Issue
Block a user