Advertisement
Guest User

Untitled

a guest
Apr 29th, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function apparitionCard(currentView){
  2.     console.log(currentView.cardIndex);
  3. }
  4.  
  5. function disapparitionCard(currentView){
  6.     movingLeft = new Animation({
  7.         view: currentView,
  8.         properties: { x:-330 },
  9.         curve: 'spring(1000,35,500)',
  10.         time: 100
  11.     });
  12.  
  13.     movingRight = new Animation({
  14.         view: currentView,
  15.         properties: { x:360 },
  16.         curve: 'spring(1000,35,500)',
  17.         time: 100
  18.     })
  19.  
  20.     if(currentView.x - 15 > 15){
  21.         movingRight.start();
  22.         movingRight.on('end',apparitionCard(currentView));
  23.     } else {
  24.         movingLeft.start();
  25.         movingLeft.on('end',apparitionCard(currentView));
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement