[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - loleaflet/src
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Sep 12 19:48:52 UTC 2018
loleaflet/src/layer/marker/ClipboardContainer.js | 4 ++++
loleaflet/src/layer/tile/TileLayer.js | 4 +---
2 files changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 2f4ca1077950f0fdba7cafe0234fa863c0738f32
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Wed Sep 12 07:10:53 2018 -0400
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Sep 12 21:48:33 2018 +0200
loleaflet: delegate clip container to show the cursor
Change-Id: I80d556d9e29cfa2ced0afcf985d41862ecd98ba5
Reviewed-on: https://gerrit.libreoffice.org/60388
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/src/layer/marker/ClipboardContainer.js b/loleaflet/src/layer/marker/ClipboardContainer.js
index 90fbc8766..9308babdc 100644
--- a/loleaflet/src/layer/marker/ClipboardContainer.js
+++ b/loleaflet/src/layer/marker/ClipboardContainer.js
@@ -78,6 +78,10 @@ L.ClipboardContainer = L.Layer.extend({
return this._textArea;
},
+ showCursor: function () {
+ this._map.addLayer(this._map._docLayer._cursorMarker);
+ },
+
_setPos: function (pos) {
L.DomUtil.setPosition(this._container, pos);
}
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index a1134711b..30d266df0 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1456,8 +1456,7 @@ L.TileLayer = L.GridLayer.extend({
this._cursorMarker.setLatLng(cursorPos, pixBounds.getSize().multiplyBy(this._map.getZoomScale(this._map.getZoom())));
}
- this._map.addLayer(this._cursorMarker);
- return this._visibleCursor.getNorthWest();
+ this._map._clipboardContainer.showCursor();
},
// Update cursor layer (blinking cursor).
@@ -1492,7 +1491,6 @@ L.TileLayer = L.GridLayer.extend({
// the state of the document (if the falgs are set)
_updateCursorAndOverlay: function (update) {
if (this._map._permission === 'edit'
- && this._map._clipboardContainer.activeElement() === document.activeElement
&& this._isCursorVisible
&& this._isCursorOverlayVisible
&& !this._isEmptyRectangle(this._visibleCursor)) {
More information about the Libreoffice-commits
mailing list