Merge pull request #4135 from IgorA100/patch-184549

Fix: When executing "setTouchAction: function(el)" check if the element is passed to the function (panzoom.js)
This commit is contained in:
Isaac Connor
2024-09-17 09:22:25 -04:00
committed by GitHub

View File

@@ -175,6 +175,7 @@ var zmPanZoom = {
},
setTouchAction: function(el) {
if (!el) return;
const currentScale = el.getScale().toFixed(1);
if (currentScale == 1) {
el.setOptions({touchAction: 'manipulation'});