loleaflet/src/layer/vector/SVGGroup.js |   11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

New commits:
commit cbdccb6d1d2c5b6185c0a807ee2a6c760a0d01aa
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Wed Jan 22 11:07:20 2020 -0400
Commit:     Henry Castro <hcas...@collabora.com>
CommitDate: Wed Jan 22 19:54:02 2020 +0100

    loleaflet: do not remove the rectangle path
    
    The main invisible rectangle should not be removed
    and the SVG is just a background it should not be
    draggable
    
    Change-Id: I828c38dbdab3cf9baad5002b5f45470c5e4fa07a
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87196
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Henry Castro <hcas...@collabora.com>

diff --git a/loleaflet/src/layer/vector/SVGGroup.js 
b/loleaflet/src/layer/vector/SVGGroup.js
index accec4b63..464dd633f 100644
--- a/loleaflet/src/layer/vector/SVGGroup.js
+++ b/loleaflet/src/layer/vector/SVGGroup.js
@@ -50,14 +50,9 @@ L.SVGGroup = L.Layer.extend({
                if (doc.lastChild.localName !== 'svg' || this._dragStarted)
                        return;
 
-               L.DomUtil.remove(this._rect._path);
-               this._svg = this._path.appendChild(doc.lastChild);
-               this._svg.setAttribute('pointer-events', 'visiblePainted');
-               this._dragShape = this._svg;
-               if (!this.options.manualDrag) {
-                       L.DomEvent.on(this._svg, 'mousedown', 
this._onDragStart, this);
-               }
-
+               this._svg = this._path.insertBefore(doc.lastChild, 
this._rect._path);
+               this._dragShape = this._rect._path;
+               this._svg.setAttribute('pointer-events', 'none');
                this._svg.setAttribute('opacity', 0);
                this.sizeSVG();
                this._update();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to