[Libreoffice-commits] online.git: loleaflet/src
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Apr 12 13:58:01 UTC 2019
loleaflet/src/layer/vector/SVGGroup.js | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
New commits:
commit 0be4eee313280ad9fb28e47d0bfb1ca5064f4cc6
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Apr 4 10:51:37 2019 -0400
Commit: Henry Castro <hcastro at 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 <hcastro at collabora.com>
Tested-by: Henry Castro <hcastro at 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();
},
More information about the Libreoffice-commits
mailing list