You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.
I have an instance where I want to animate multiple DOM elements at the same time. The function throwout is run multiple times to achieve this. And once the animation is done I destroy the spring in onSpringAtRest callback. But this throw error Cant read property 'systemShouldAdvance' of undefined if I run the function few times immediately after the other. If I remove the spring.destroy() the error doesnt occur. But I dont want any memory leaks as users might run this function several times.
springSystem = new Rebound.SpringSystem();
function Throwout(direction,target,fromX,fromY){
let throwSpring = this.springSystem.createSpring(500,50);
throwSpring.addListener({
onSpringAtRest: (spring) => {
this.swipePan = false;
spring.destroy();
},
throwSpring.setCurrentValue(0).setAtRest().setVelocity(throwVelocity).setEndValue(1);
}
The text was updated successfully, but these errors were encountered:
I have an instance where I want to animate multiple
DOM
elements at the same time. The functionthrowout
is run multiple times to achieve this. And once the animation is done Idestroy
thespring
inonSpringAtRest
callback. But this throw errorCant read property 'systemShouldAdvance' of undefined
if I run the function few times immediately after the other. If I remove thespring.destroy()
the error doesnt occur. But I dont want any memory leaks as users might run this function several times.The text was updated successfully, but these errors were encountered: