Skip to content

Commit

Permalink
Merge pull request #4138 from IgorA100/patch-976391
Browse files Browse the repository at this point in the history
Fix: PanZoom Panning didn't work when using "preventDefault"
  • Loading branch information
connortechnology authored Sep 18, 2024
2 parents 2ed6ca0 + 52a5bf2 commit a6f7d1a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions web/js/panzoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,14 @@ var zmPanZoom = {
}
}
}

if (this.panZoom[id].getScale().toFixed(1) > 1) {
this.panZoom[id].setOptions({handleStartEvent: (event) => {
event.preventDefault();
}});
} else {
this.panZoom[id].setOptions({handleStartEvent: (event) => {}});
}
},

click: function(id) {
Expand Down

0 comments on commit a6f7d1a

Please sign in to comment.