8000 fix: incorrect position card after card throwin or throwout action #1… · gajus/swing@45b5787 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 45b5787

Browse files
ssanjungajus
authored andcommitted
fix: incorrect position card after card throwin or throwout action #123 (#131)
1 parent c7cebdf commit 45b5787

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Card.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,15 @@ const Card = (stack, targetElement, prepend) => {
320320
lastThrow.direction = direction || computeDirection(fromX, fromY, config.allowedDirections);
321321

322322
if (where === Card.THROW_IN) {
323+
Card.appendToParent(targetElement);
323324
springThrowIn.setCurrentValue(0).setAtRest().setEndValue(1);
324325

325326
eventEmitter.trigger('throwin', {
326327
target: targetElement,
327328
throwDirection: lastThrow.direction
328329
});
329330
} else if (where === Card.THROW_OUT) {
331+
Card.appendToParent(targetElement);
330332
springThrowOut.setCurrentValue(0).setAtRest().setVelocity(100).setEndValue(1);
331333

332334
eventEmitter.trigger('throwout', {

0 commit comments

Comments
 (0)
0