[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-1' - loleaflet/src
Henry Castro (via logerrit)
logerrit at kemper.freedesktop.org
Thu Mar 19 15:36:00 UTC 2020
loleaflet/src/layer/tile/TileLayer.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit a6447b9ea29a5cb8fdac0569a58a68b1b63d5dfc
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Mar 19 09:51:05 2020 -0400
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Mar 19 16:35:37 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/+/90640
Tested-by: Andras Timar <andras.timar at collabora.com>
Reviewed-by: Andras Timar <andras.timar at 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()) {
More information about the Libreoffice-commits
mailing list