loleaflet/src/layer/vector/SVGGroup.js |   17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

New commits:
commit 9b2070932fd7002579a6e65bbc47dfa65f70805e
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Thu Apr 4 10:51:37 2019 -0400
Commit:     Jan Holesovsky <ke...@collabora.com>
CommitDate: Fri May 3 18:16:55 2019 +0200

    loleaflet: fix "select text with mouse after clicking into text box moves 
...
    
    text box instead"
    
    Change-Id: Id867af5ebf7c93cc494be7fad93aae235ffa36d1
    Reviewed-on: https://gerrit.libreoffice.org/70262
    Reviewed-by: Henry Castro <hcas...@collabora.com>
    Tested-by: Henry Castro <hcas...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/70670
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>
    Tested-by: Jan Holesovsky <ke...@collabora.com>

diff --git a/loleaflet/src/layer/vector/SVGGroup.js 
b/loleaflet/src/layer/vector/SVGGroup.js
index 351b000dd..48a1e5967 100644
--- a/loleaflet/src/layer/vector/SVGGroup.js
+++ b/loleaflet/src/layer/vector/SVGGroup.js
@@ -32,14 +32,21 @@ L.SVGGroup = L.Layer.extend({
                if (doc.lastChild.localName !== 'svg')
                        return;
 
-               L.DomUtil.remove(this._rect._path);
-               this._svg = this._path.appendChild(doc.lastChild);
+               if (svgString.indexOf('XTEXT_PAINTSHAPE_BEGIN') !== -1) {
+                       this._svg = this._path.insertBefore(doc.lastChild, 
this._rect._path);
+                       this._rect._path.setAttribute('pointer-events', 
'visibleStroke');
+                       this._svg.setAttribute('pointer-events', 'none');
+               } else {
+                       L.DomUtil.remove(this._rect._path);
+                       this._svg = this._path.appendChild(doc.lastChild);
+                       this._svg.setAttribute('pointer-events', 
'visiblePainted');
+                       L.DomEvent.on(this._svg, 'mousedown', 
this._onDragStart, this);
+                       this._dragShape = this._svg;
+               }
+
                this._svg.setAttribute('opacity', 0);
                this._svg.setAttribute('width', size.x);
                this._svg.setAttribute('height', size.y);
-               this._svg.setAttribute('pointer-events', 'visiblePainted');
-               this._dragShape = this._svg;
-               L.DomEvent.on(this._svg, 'mousedown', this._onDragStart, this);
 
                this._update();
        },
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to