Commit f95e6046 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

prevent measure markers getting grabbed

parent 6b24e71d
...@@ -199,7 +199,11 @@ ...@@ -199,7 +199,11 @@
this._layerPaint = L.layerGroup().addTo(this._map); this._layerPaint = L.layerGroup().addTo(this._map);
} }
this._controls = {}; this._controls = {
hc:{
getState: function(){return false;}
}
};
this.h_control = false; this.h_control = false;
...@@ -458,7 +462,9 @@ ...@@ -458,7 +462,9 @@
_mouseMove: function(e){ _mouseMove: function(e){
this._map.on('click',this._mouseClick,this); // necassary for _dragCircle. If switched on already within _dragCircle an unwanted click is fired at the end of the drag. // from some plugin - I didn't test if it's true
// necassary for _dragCircle. If switched on already within _dragCircle an unwanted click is fired at the end of the drag.
this._map.on('click',this._mouseClick,this);
}, },
...@@ -478,6 +484,9 @@ ...@@ -478,6 +484,9 @@
this._map.on('mousemove',this.setHeading,this); this._map.on('mousemove',this.setHeading,this);
this._map.on('mouseup',this._mouseUp,this); this._map.on('mouseup',this._mouseUp,this);
// prevent image getting grabbed by browser
e.originalEvent.preventDefault();
}, },
_mouseUp: function(e){ _mouseUp: function(e){
......
...@@ -110,6 +110,9 @@ ...@@ -110,6 +110,9 @@
if (param.target){ if (param.target){
index = this.draggedMarker._index; index = this.draggedMarker._index;
latlng = param.latlng; latlng = param.latlng;
// prevent image getting grabbed by browser
param.originalEvent.preventDefault();
} }
var p1_ll = this._latlng; var p1_ll = this._latlng;
...@@ -279,7 +282,7 @@ ...@@ -279,7 +282,7 @@
}, },
_syncMeasureMarkersToBasePoint: function(){ _syncMeasureMarkersToBasePoint: function(e){
if (this._measureMarkers.length!=0){ if (this._measureMarkers.length!=0){
if (this._measureBase!=this._latlng){ if (this._measureBase!=this._latlng){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment