Skip to content

Commit

Permalink
handle 0 wheel deltaX
Browse files Browse the repository at this point in the history
  • Loading branch information
light-and-ray committed Mar 16, 2024
1 parent 3e0146f commit c364b60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions-builtin/canvas-zoom-and-pan/javascript/zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ onUiLoaded(async() => {

targetElement.addEventListener("wheel", e => {
// change zoom level
const operation = e.deltaY > 0 ? "-" : "+";
const operation = (e.deltaY || -e.wheelDelta) > 0 ? "-" : "+";
changeZoomLevel(operation, e);

// Handle brush size adjustment with ctrl key pressed
Expand Down

0 comments on commit c364b60

Please sign in to comment.