loleaflet/src/layer/vector/SVGGroup.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
New commits: commit 0be4eee313280ad9fb28e47d0bfb1ca5064f4cc6 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Thu Apr 4 10:51:37 2019 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Fri Apr 12 15:57:36 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> diff --git a/loleaflet/src/layer/vector/SVGGroup.js b/loleaflet/src/layer/vector/SVGGroup.js index a61aa35c3..12c3a2931 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