Move axe back to original position after chop
This commit is contained in:
@@ -35,6 +35,9 @@ interface AxeAnimationArgs {
|
||||
}
|
||||
|
||||
const playAxeAnimation = async ({axe, stickyNote, onChopped}: AxeAnimationArgs) => {
|
||||
const originalX = axe.x;
|
||||
const originalY = axe.y;
|
||||
|
||||
await miro.board.bringToFront(axe);
|
||||
axe.x = stickyNote.x;
|
||||
axe.y = stickyNote.y;
|
||||
@@ -51,6 +54,10 @@ const playAxeAnimation = async ({axe, stickyNote, onChopped}: AxeAnimationArgs)
|
||||
}
|
||||
|
||||
onChopped();
|
||||
|
||||
axe.x = originalX;
|
||||
axe.y = originalY;
|
||||
await axe.sync();
|
||||
}
|
||||
|
||||
const postInfoNotification = async (message: string) =>
|
||||
|
||||
Reference in New Issue
Block a user