Page 1 of 1
Animating a move from one Stock to another
Posted: 16 December 2014, 03:52
by sparr
Code: Select all
this.currentcanvas.removeFromStockById( card.id );
this.previouscanvas.addToStockWithId( card.type , card.id, 'currentcanvas' );
I'm moving a card from currentcanvas to previouscanvas. I'd love to have the "from" parameter on the second call be the precise location the card is coming from, rather than the center of the whole currentcanvas element. How can I make this work? I get an error if I try to spawn the new card before destroying the old one, and with the old one gone I can't properly target the source of the sliding animation.
Re: Animating a move from one Stock to another
Posted: 25 December 2014, 05:11
by pikiou
You should't get the first error you mentioned. Do your stocks have a different html id?
Re: Animating a move from one Stock to another
Posted: 25 December 2014, 21:15
by sparr
I must have been doing something wrong before. It works fine now, and all my animations are now starting/ending where they belong.