generated from dave/wails-template
Enable scroll through time with mousewheel
This commit is contained in:
@@ -18,9 +18,16 @@
|
|||||||
scrollingTimeFrameStore.next();
|
scrollingTimeFrameStore.next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function scroll(event: WheelEvent) {
|
||||||
|
if (event.deltaY < 0) {
|
||||||
|
scrollingTimeFrameStore.next();
|
||||||
|
} else {
|
||||||
|
scrollingTimeFrameStore.prev();
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:window on:keydown={keyDown} />
|
<svelte:window on:keydown={keyDown} on:wheel={scroll} />
|
||||||
<Toaster theme="dark" expand visibleToasts={9} />
|
<Toaster theme="dark" expand visibleToasts={9} />
|
||||||
<template>
|
<template>
|
||||||
<!-- <Header /> -->
|
<!-- <Header /> -->
|
||||||
|
Reference in New Issue
Block a user