Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rexrainbow committed Oct 12, 2023
1 parent 1d9801f commit 753b08b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ var PanScrollPinchZoom = function (panScrollEnable, pinchZoomEnable) {
if (panScrollEnable) {
pinch.on('drag1', function (pinch) {
var drag1Vector = pinch.drag1Vector;
camera.scrollX -= drag1Vector.x;
camera.scrollY -= drag1Vector.y;

var zoom = camera.zoom;
camera.scrollX -= drag1Vector.x / zoom;
camera.scrollY -= drag1Vector.y / zoom;
})
}

Expand Down

0 comments on commit 753b08b

Please sign in to comment.