loleaflet: Disable mouse when dragging text.

This commit is contained in:
Henry Castro 2015-06-29 00:27:00 -04:00
parent fa3b208b7f
commit ec2de8f46e

View file

@ -671,6 +671,9 @@ L.TileLayer = L.GridLayer.extend({
_onMouseEvent: function (e) {
if (this._graphicMarker && this._graphicMarker.isDragged) { return; }
if (this._startMarker.isDragged === true || this._endMarker.isDragged === true)
return;
if (e.type === 'mousedown') {
this._selecting = true;
this._clearSelections();
@ -887,7 +890,7 @@ L.TileLayer = L.GridLayer.extend({
// Update text selection handlers.
_onUpdateTextSelection: function () {
if ( this._startMarker.isDragged === true || this._endMarker.isDragged === true)
if (this._startMarker.isDragged === true || this._endMarker.isDragged === true)
return;
if (this._selections.getLayers().length !== 0) {