From 21d866f51c4605404644c09633f395f1d8d478b4 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 4 Feb 2014 18:23:11 +0400 Subject: [PATCH] tweaking of the ribbon scroll... Signed-off-by: Alex A. Naanou --- lib/jli.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/jli.js b/lib/jli.js index 3d0ba64..46c1fbc 100755 --- a/lib/jli.js +++ b/lib/jli.js @@ -447,8 +447,12 @@ function animateElementTo(elem, to, duration, easing, speed, use_transitions){ left: to.left - from.left, } elem.animating = true + elem.next_frame = null function animate(){ + if(elem.next_frame === false){ + return + } var t = Date.now() // end of the animation... if(t >= then){ @@ -517,6 +521,7 @@ function animateElementTo(elem, to, duration, easing, speed, use_transitions){ function stopAnimation(elem){ if(elem.next_frame){ cancelAnimationFrame(elem.next_frame) + elem.next_frame = false } }