[Libreoffice-commits] online.git: loleaflet/src
Henry Castro (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jan 22 18:55:06 UTC 2020
loleaflet/src/layer/vector/SVGGroup.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 576e41a682e26d3b2911214c5f669492a13c1bef
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Wed Jan 22 12:25:17 2020 -0400
Commit: Henry Castro <hcastro at collabora.com>
CommitDate: Wed Jan 22 19:54:47 2020 +0100
loleaflet: show SVG background while dragging
When a user creates a graphic and immediately start
dragging it will show only a bounding rectangle,
then it will show the proper SVG background when
download is complete
Change-Id: I3b623e6a15b5af683f858171f22f47af101495c3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87200
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
diff --git a/loleaflet/src/layer/vector/SVGGroup.js b/loleaflet/src/layer/vector/SVGGroup.js
index 464dd633f..8ded23f26 100644
--- a/loleaflet/src/layer/vector/SVGGroup.js
+++ b/loleaflet/src/layer/vector/SVGGroup.js
@@ -47,13 +47,13 @@ L.SVGGroup = L.Layer.extend({
addEmbeddedSVG: function (svgString) {
var doc = this.parseSVG(svgString);
- if (doc.lastChild.localName !== 'svg' || this._dragStarted)
+ if (doc.lastChild.localName !== 'svg')
return;
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._svg.setAttribute('opacity', this._dragStarted ? 1 : 0);
this.sizeSVG();
this._update();
},
More information about the Libreoffice-commits
mailing list