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 <hcas...@collabora.com>
AuthorDate: Wed Sep 12 07:10:53 2018 -0400
Commit:     Andras Timar <andras.ti...@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.ti...@collabora.com>
    Tested-by: Andras Timar <andras.ti...@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)) {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to