loleaflet/src/layer/tile/TileLayer.js |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 212d707227a11955719ae0a238bc546935ea919c
Author:     Pranam Lashkari <lpra...@collabora.com>
AuthorDate: Tue Apr 7 00:38:50 2020 +0530
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Mon Apr 6 21:47:10 2020 +0200

    leaflet: stoped view jumping when deselecting shapes/images
    
    cause of the problem: if the last position of the cursor
    before selecting a complex object is out of view
    then the page will scroll to that point.
    This happens because scrolling takes place between
    deselecting object and cursor position update
    
    test failing problem with aba812f resolved
    
    Change-Id: I7c1aea4a4a8b83cec9bd166adaa0e099ad16f070
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91781
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 3d3c86bf1..a38f88049 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -2140,7 +2140,12 @@ L.TileLayer = L.GridLayer.extend({
                var cursorPos = this._visibleCursor.getNorthWest();
                var docLayer = this._map._docLayer;
 
-               if (!zoom && scroll !== false && 
!this._map.getBounds().contains(this._visibleCursor) && 
this._map._isCursorVisible) {
+               if (!zoom
+               && scroll !== false
+               && !this._map.getBounds().contains(this._visibleCursor)
+               && this._map._isCursorVisible
+               && this._map._clip._selectionType !== 'complex') {
+
                        var center = this._map.project(cursorPos);
                        center = 
center.subtract(this._map.getSize().divideBy(2));
                        center.x = Math.round(center.x < 0 ? 0 : center.x);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to