Move axe back to original position after chop

This commit is contained in:
DrHaid
2025-12-13 21:02:39 +01:00
parent 40872adafe
commit 8f62f8a062

View File

@@ -35,6 +35,9 @@ interface AxeAnimationArgs {
} }
const playAxeAnimation = async ({axe, stickyNote, onChopped}: AxeAnimationArgs) => { const playAxeAnimation = async ({axe, stickyNote, onChopped}: AxeAnimationArgs) => {
const originalX = axe.x;
const originalY = axe.y;
await miro.board.bringToFront(axe); await miro.board.bringToFront(axe);
axe.x = stickyNote.x; axe.x = stickyNote.x;
axe.y = stickyNote.y; axe.y = stickyNote.y;
@@ -51,6 +54,10 @@ const playAxeAnimation = async ({axe, stickyNote, onChopped}: AxeAnimationArgs)
} }
onChopped(); onChopped();
axe.x = originalX;
axe.y = originalY;
await axe.sync();
} }
const postInfoNotification = async (message: string) => const postInfoNotification = async (message: string) =>