Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function apparitionCard(currentView){
- console.log(currentView.cardIndex);
- }
- function disapparitionCard(currentView){
- movingLeft = new Animation({
- view: currentView,
- properties: { x:-330 },
- curve: 'spring(1000,35,500)',
- time: 100
- });
- movingRight = new Animation({
- view: currentView,
- properties: { x:360 },
- curve: 'spring(1000,35,500)',
- time: 100
- })
- if(currentView.x - 15 > 15){
- movingRight.start();
- movingRight.on('end',apparitionCard(currentView));
- } else {
- movingLeft.start();
- movingLeft.on('end',apparitionCard(currentView));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement