From 45b578770c2bc0093225674a2049f2ec7d14160f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=95=9C=EC=A4=80=ED=9D=AC=20CX?= Date: Sat, 18 Aug 2018 21:42:38 +0900 Subject: [PATCH] fix: incorrect position card after card throwin or throwout action #123 (#131) --- src/Card.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Card.js b/src/Card.js index 729fa6b..88f87fe 100644 --- a/src/Card.js +++ b/src/Card.js @@ -320,6 +320,7 @@ 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', { @@ -327,6 +328,7 @@ const Card = (stack, targetElement, prepend) => { throwDirection: lastThrow.direction }); } else if (where === Card.THROW_OUT) { + Card.appendToParent(targetElement); springThrowOut.setCurrentValue(0).setAtRest().setVelocity(100).setEndValue(1); eventEmitter.trigger('throwout', {