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

New commits:
commit d19e85f9482054f8589aedee88df0f04aa76476d
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Thu Mar 19 09:51:05 2020 -0400
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Thu Mar 19 15:01:11 2020 +0100

    loleaflet: check the cell cursor width to scroll
    
    This is an improvement of the commit 
569b342c2029876b1c9ef8b54f235138bff9c792,
    It is better to check the cell cursor width instead of spacing to scroll
    the view when very large merge cell occurs
    
    Change-Id: I049cda34f886738ce9fbd3776113a219c5bd038f
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90751
    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 a398ff1bc..61a5b688b 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -2864,12 +2864,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 cursorX = 
Math.abs(this._cellCursor.getEast() - this._cellCursor.getWest());
+                                       var spacingX = cursorX / 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 (spacingX < mapX && 
this._cellCursor.getEast() > mapBounds.getEast()) {
+                                       } else if (cursorX < 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