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

New commits:
commit bb0036db81aeb9675dd349305f5d79d7f458f940
Author:     Dennis Francis <dennis.fran...@collabora.com>
AuthorDate: Fri May 15 22:43:19 2020 +0530
Commit:     Dennis Francis <dennis.fran...@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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Dennis Francis <dennis.fran...@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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to