[Libreoffice-commits] online.git: loleaflet/src

Dennis Francis (via logerrit) logerrit at kemper.freedesktop.org
Sun Jul 5 08:00:48 UTC 2020


 loleaflet/src/control/Control.Scroll.js |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit bb0036db81aeb9675dd349305f5d79d7f458f940
Author:     Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Fri May 15 22:43:19 2020 +0530
Commit:     Dennis Francis <dennis.francis at collabora.com>
CommitDate: Sun Jul 5 10:00:28 2020 +0200

    call refreshViewData after 'scrolloffset' is fired
    
    otherwise the header controls won't have the right position info
    when refreshViewData causes an ~immediate header/gridline rendering
    (.uno:SheetGeometryData source). This was not a problem in case of
    .uno:ViewRowColumnHeader source, because of the roundtrip delay for
    getting the msg from core.
    
    Change-Id: I48298dbfb8d62acc64adbfd662a5304b856d702a
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97946
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Dennis Francis <dennis.francis at collabora.com>

diff --git a/loleaflet/src/control/Control.Scroll.js b/loleaflet/src/control/Control.Scroll.js
index cb323e1c7..36eed31fe 100644
--- a/loleaflet/src/control/Control.Scroll.js
+++ b/loleaflet/src/control/Control.Scroll.js
@@ -114,11 +114,10 @@ L.Control.Scroll = L.Control.extend({
 			return;
 		}
 
-		this._map._docLayer.refreshViewData({ x: newLeft, y: newTop, offset: offset});
-
 		this._prevScrollY = newTop;
 		this._prevScrollX = newLeft;
 		this._map.fire('scrolloffset', offset);
+		this._map._docLayer.refreshViewData({ x: newLeft, y: newTop, offset: offset});
 		this._map.scroll(offset.x, offset.y);
 	},
 
@@ -266,10 +265,12 @@ L.Control.Scroll = L.Control.extend({
 		if (offset.y === 0) {
 			offset.y = 1;
 		}
+
+		this._map.fire('scrolloffset', offset);
 		if (e.updateHeaders && this._map._docLayer._docType === 'spreadsheet') {
 			this._map._docLayer.refreshViewData({x: e.x, y: e.y, offset: offset});
 		}
-		this._map.fire('scrolloffset', offset);
+
 		this._ignoreScroll = null;
 		$('.scroll-container').mCustomScrollbar('stop');
 		this._prevScrollY = e.y;


More information about the Libreoffice-commits mailing list