[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - loleaflet/src

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Nov 8 19:13:55 UTC 2018


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

New commits:
commit db048708007a901071ade5ef5b15de8927253005
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Thu Nov 8 11:04:48 2018 -0500
Commit:     Michael Meeks <michael.meeks at 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.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at 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;
 		}


More information about the Libreoffice-commits mailing list