[Libreoffice-commits] online.git: loleaflet/src
Henry Castro
hcastro at collabora.com
Sat Jun 27 16:40:54 PDT 2015
loleaflet/src/layer/tile/TileLayer.js | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit d25ed90b1ebec84dcea6cbf7a47bbfeb8bf364ef
Author: Henry Castro <hcastro at collabora.com>
Date: Sat Jun 27 19:38:31 2015 -0400
loleaflet: Disable mouse when dragging image.
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index fc83fff..3e470ec 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -669,6 +669,8 @@ L.TileLayer = L.GridLayer.extend({
},
_onMouseEvent: function (e) {
+ if (this._graphicMarker && this._graphicMarker.isDragged) { return; }
+
if (e.type === 'mousedown') {
this._selecting = true;
this._clearSelections();
@@ -836,10 +838,12 @@ L.TileLayer = L.GridLayer.extend({
var aPos = this._latLngToTwips(e.handle.getLatLng());
if (e.type === 'editstart') {
+ this._graphicMarker.isDragged = true;
this._postSelectGraphicEvent('start', aPos.x, aPos.y);
}
else if (e.type === 'editend') {
this._postSelectGraphicEvent('end', aPos.x, aPos.y);
+ this._graphicMarker.isDragged = false;
}
},
@@ -877,6 +881,7 @@ L.TileLayer = L.GridLayer.extend({
else if (this._graphicMarker) {
this._graphicMarker.off('editstart editend', this._onGraphicEdit, this);
this._map.removeLayer(this._graphicMarker);
+ this._graphicMarker.isDragged = false;
}
},
More information about the Libreoffice-commits
mailing list