[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/src
Pranav Kant
pranavk at collabora.co.uk
Mon Apr 24 17:45:13 UTC 2017
loleaflet/src/control/Control.Scroll.js | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 65ce26fe1433206af3a4eb5172409ff9e575a8ef
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Mon Apr 24 19:02:20 2017 +0530
loleaflet: Trigger layout algorithm on scrollend
This is just a quick workaround to circumvent the problem where
annotations dissappear when document is scrolled swiftly using the
mousewheel.
Change-Id: I51df6cecb770e5542ecdad765a5f0ccb6ec1eb98
(cherry picked from commit 0b419faf107383957ce4d6970f459f20061c9d5b)
Reviewed-on: https://gerrit.libreoffice.org/36889
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/loleaflet/src/control/Control.Scroll.js b/loleaflet/src/control/Control.Scroll.js
index d47d422e..fe533405 100644
--- a/loleaflet/src/control/Control.Scroll.js
+++ b/loleaflet/src/control/Control.Scroll.js
@@ -116,6 +116,12 @@ L.Control.Scroll = L.Control.extend({
}
this._prevScrollY = -e.mcs.top;
this._prevScrollX = -e.mcs.left;
+ // Scrolling quickly via mousewheel messes up the annotations for some reason
+ // Triggering the layouting algorithm here, though unnecessary, fixes the problem.
+ // This is just a workaround till we find the root cause of why it messes up the annotations
+ if (this._map._docLayer._annotations.layout) {
+ this._map._docLayer._annotations.layout();
+ }
},
_onScrollTo: function (e) {
More information about the Libreoffice-commits
mailing list