Skip to content

Commit

Permalink
Changed zoom direction on canvas to be the same
Browse files Browse the repository at this point in the history
than leaflet map
  • Loading branch information
frasanz committed Sep 25, 2024
1 parent 787d7e2 commit 9f0341b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ $(document).ready(function () {

// Mouse wheel
canvas.on('mouse:wheel', function (event) {
const delta = event.e.deltaY; // Get the scroll direction
const delta = -event.e.deltaY; // Get the scroll direction
let zoom = group.scaleX + delta / 300; // Adjust the zoom factor
zoom = Math.max(0.1, zoom); // Set a minimum zoom level
group.scaleX = zoom; // Apply the zoom to the X-axis
Expand Down

0 comments on commit 9f0341b

Please sign in to comment.