loleaflet/src/layer/tile/TileLayer.js  |    3 ++-
 loleaflet/src/layer/vector/SVGGroup.js |    9 ++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 1e044a40aa9e0b8e2313d4677755c630cb444448
Author:     Tomaž Vajngerl <[email protected]>
AuthorDate: Tue Aug 27 23:44:14 2019 +0900
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Tue Aug 27 21:59:36 2019 +0200

    suppress mouseout even when dragging a graphic selection
    
    This fixes the problem when a mouseout event interrupts dragging
    of a graphic selection. Not sure if it is the most correct thing
    to do, but we can't set "pointer-events" to none on the graphic
    selection as this then wouldn't recognise that we want to move
    it around.
    
    Change-Id: I42a4785fec0b674d47cd4d7c2977877607b03db8
    Reviewed-on: https://gerrit.libreoffice.org/78200
    Reviewed-by: Tomaž Vajngerl <[email protected]>
    Tested-by: Tomaž Vajngerl <[email protected]>

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index bbd91a889..95b489b84 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -2373,7 +2373,8 @@ L.TileLayer = L.GridLayer.extend({
                                transform: true,
                                stroke: false,
                                fillOpacity: 0,
-                               fill: true
+                               fill: true,
+                               ignoreMouseOut: true
                        });
 
                        if (!this._graphicMarker) {
diff --git a/loleaflet/src/layer/vector/SVGGroup.js 
b/loleaflet/src/layer/vector/SVGGroup.js
index c0297e080..203d0f63a 100644
--- a/loleaflet/src/layer/vector/SVGGroup.js
+++ b/loleaflet/src/layer/vector/SVGGroup.js
@@ -7,7 +7,8 @@ L.SVGGroup = L.Layer.extend({
 
        options: {
                noClip: true,
-               manualDrag: false
+               manualDrag: false,
+               ignoreMouseOut: false
        },
 
        initialize: function (bounds, options) {
@@ -64,7 +65,8 @@ L.SVGGroup = L.Layer.extend({
                if (!this.options.manualDrag) {
                        L.DomEvent.on(this._dragShape, 'mousemove', 
this._onDrag, this);
                        L.DomEvent.on(this._dragShape, 'mouseup', 
this._onDragEnd, this);
-                       L.DomEvent.on(this._dragShape, 'mouseout', 
this._onDragEnd, this);
+                       if (!this.options.ignoreMouseOut)
+                               L.DomEvent.on(this._dragShape, 'mouseout', 
this._onDragEnd, this);
                }
 
                var data = {
@@ -99,7 +101,8 @@ L.SVGGroup = L.Layer.extend({
                if (!this.options.manualDrag) {
                        L.DomEvent.off(this._dragShape, 'mousemove', 
this._onDrag, this);
                        L.DomEvent.off(this._dragShape, 'mouseup', 
this._onDragEnd, this);
-                       L.DomEvent.off(this._dragShape, 'mouseout', 
this._onDragEnd, this);
+                       if (!this.options.ignoreMouseOut)
+                               L.DomEvent.off(this._dragShape, 'mouseout', 
this._onDragEnd, this);
                }
 
                this._moved = false;
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to