@h21-map/leaflet-zoom-box
Advanced tools
Comparing version 1.0.4 to 1.0.5
19
index.js
@@ -157,12 +157,11 @@ var ZoomBox = function (map) { | ||
if (!this._isBeginDrawBinded) { | ||
me._map.on('contextmenu', (e) => { | ||
if (e.type === 'contextmenu') { | ||
this._isBeginDrawBinded = true; | ||
document.oncontextmenu = function () { return false }; | ||
me._map.off('mousemove', me.drawingRect, this); | ||
me._map.dragging.disable(); | ||
me._map.getContainer().style.cursor = 'crosshair'; | ||
beginDrawRect(e); | ||
} | ||
me._map.on('mousedown', (e) => { | ||
e = window.event || e; | ||
if (e.button != 2) { return; } | ||
this._isBeginDrawBinded = true; | ||
document.oncontextmenu = function () { return false }; | ||
me._map.off('mousemove', me.drawingRect, this); | ||
me._map.dragging.disable(); | ||
me._map.getContainer().style.cursor = 'crosshair'; | ||
beginDrawRect(e); | ||
}); | ||
@@ -169,0 +168,0 @@ } |
@@ -5,3 +5,3 @@ | ||
"scope":"@h21-map", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "A library of Leaflet Map JS API", | ||
@@ -8,0 +8,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8718