mirror of
https://github.com/flynx/PortableMag.git
synced 2025-10-29 11:10:08 +00:00
tweaking of the ribbon scroll...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
8a3bbc493a
commit
21d866f51c
@ -447,8 +447,12 @@ function animateElementTo(elem, to, duration, easing, speed, use_transitions){
|
|||||||
left: to.left - from.left,
|
left: to.left - from.left,
|
||||||
}
|
}
|
||||||
elem.animating = true
|
elem.animating = true
|
||||||
|
elem.next_frame = null
|
||||||
|
|
||||||
function animate(){
|
function animate(){
|
||||||
|
if(elem.next_frame === false){
|
||||||
|
return
|
||||||
|
}
|
||||||
var t = Date.now()
|
var t = Date.now()
|
||||||
// end of the animation...
|
// end of the animation...
|
||||||
if(t >= then){
|
if(t >= then){
|
||||||
@ -517,6 +521,7 @@ function animateElementTo(elem, to, duration, easing, speed, use_transitions){
|
|||||||
function stopAnimation(elem){
|
function stopAnimation(elem){
|
||||||
if(elem.next_frame){
|
if(elem.next_frame){
|
||||||
cancelAnimationFrame(elem.next_frame)
|
cancelAnimationFrame(elem.next_frame)
|
||||||
|
elem.next_frame = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user