Skip to content

Commit 911a259

Browse files
authored
Merge pull request #238 from binaryBrandon/support-touchpad-horizontal-scroll
Remove default of 0 for camera.panBy call, add horizontal wheel and touchpad scrolling
2 parents 65a93fa + 7699138 commit 911a259

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/lib/components/Reader/PagedViewport.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@
140140
}
141141
e.preventDefault();
142142
motion.beforeAnimatedScroll();
143-
camera.panBy(0, -normalizeWheelDelta(e.deltaY, e.deltaMode));
143+
camera.panBy(-normalizeWheelDelta(e.deltaX, e.deltaMode),
144+
-normalizeWheelDelta(e.deltaY, e.deltaMode));
144145
}
145146
146147
function doubleTap(x: number, y: number) {

0 commit comments

Comments
 (0)