loleaflet/src/dom/PosAnimation.js |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit db048708007a901071ade5ef5b15de8927253005
Author:     Ashod Nakashian <ashod.nakash...@collabora.co.uk>
AuthorDate: Thu Nov 8 11:04:48 2018 -0500
Commit:     Michael Meeks <michael.me...@collabora.com>
CommitDate: Thu Nov 8 20:13:37 2018 +0100

    leaflet: stop animating comment-box when reached dest
    
    This reduces CPU significantly, as the constant step
    checks are quite CPU intensive and we do them way too
    often.
    
    Change-Id: Ief573dcd5311974894be6a99f709db5f9a1a26d3
    Reviewed-on: https://gerrit.libreoffice.org/63107
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>
    Tested-by: Michael Meeks <michael.me...@collabora.com>

diff --git a/loleaflet/src/dom/PosAnimation.js 
b/loleaflet/src/dom/PosAnimation.js
index 5a2ef634e..eae9309b5 100644
--- a/loleaflet/src/dom/PosAnimation.js
+++ b/loleaflet/src/dom/PosAnimation.js
@@ -40,7 +40,7 @@ L.PosAnimation = L.Class.extend({
 
        _onStep: function () {
                var stepPos = this._getPos();
-               if (!stepPos) {
+               if (!stepPos || (this._el._leaflet_pos.x == stepPos.x && 
this._el._leaflet_pos.y == stepPos.y)) {
                        this._onTransitionEnd();
                        return;
                }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to