loleaflet/src/control/Control.Scroll.js | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 0b419faf107383957ce4d6970f459f20061c9d5b Author: Pranav Kant <pran...@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 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) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits