Skip to content

Commit

Permalink
fix: incorrect position card after card throwin or throwout action #123
Browse files Browse the repository at this point in the history
… (#131)
  • Loading branch information
ssanjun authored and gajus committed Aug 18, 2018
1 parent c7cebdf commit 45b5787
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,15 @@ const Card = (stack, targetElement, prepend) => {
lastThrow.direction = direction || computeDirection(fromX, fromY, config.allowedDirections);

if (where === Card.THROW_IN) {
Card.appendToParent(targetElement);
springThrowIn.setCurrentValue(0).setAtRest().setEndValue(1);

eventEmitter.trigger('throwin', {
target: targetElement,
throwDirection: lastThrow.direction
});
} else if (where === Card.THROW_OUT) {
Card.appendToParent(targetElement);
springThrowOut.setCurrentValue(0).setAtRest().setVelocity(100).setEndValue(1);

eventEmitter.trigger('throwout', {
Expand Down

0 comments on commit 45b5787

Please sign in to comment.