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

New commits:
commit 569b342c2029876b1c9ef8b54f235138bff9c792
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Tue Mar 17 16:38:01 2020 -0400
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Wed Mar 18 23:08:07 2020 +0100

    loleaflet: do not scroll cell cursor marker if width is very large
    
    When the cursor has a large width due to full merged row cell
    it has an undesired effect that scroll to last columns
    
    Change-Id: Ic939b8d9c3007faa46897893cc462cf3dbbee563
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90671
    Tested-by: Andras Timar <andras.ti...@collabora.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 7cdea620d..a398ff1bc 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -2863,12 +2863,13 @@ L.TileLayer = L.GridLayer.extend({
                                        }
                                }
                                else if (horizontalDirection !== 0 || 
verticalDirection != 0) {
+                                       var mapX = Math.abs(mapBounds.getEast() 
- mapBounds.getWest());
                                        var spacingX = 
Math.abs(this._cellCursor.getEast() - this._cellCursor.getWest()) / 4.0;
                                        var spacingY = 
Math.abs((this._cellCursor.getSouth() - this._cellCursor.getNorth())) / 4.0;
 
                                        if (this._cellCursor.getWest() < 
mapBounds.getWest()) {
                                                scrollX = 
this._cellCursor.getWest() - mapBounds.getWest() - spacingX;
-                                       } else if (this._cellCursor.getEast() > 
mapBounds.getEast()) {
+                                       } else if (spacingX < mapX && 
this._cellCursor.getEast() > mapBounds.getEast()) {
                                                scrollX = 
this._cellCursor.getEast() - mapBounds.getEast() + spacingX;
                                        }
                                        if (this._cellCursor.getNorth() > 
mapBounds.getNorth()) {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to