From 04dffbc33a009d5c7f2983040ac09d7e12b6dd42 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Tue, 18 Oct 2022 14:15:53 -0700 Subject: [PATCH] chore: fix mutator blocks jumping (#6559) * chore: fix mutator blocks jumping * chore: format --- core/block_animations.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/block_animations.ts b/core/block_animations.ts index 68b8d7582..47ee63581 100644 --- a/core/block_animations.ts +++ b/core/block_animations.ts @@ -188,7 +188,11 @@ function disconnectUiStep(group: SVGElement, magnitude: number, start: Date) { skew = `skewX(${val})`; disconnectPid = setTimeout(disconnectUiStep, 10, group, magnitude, start); } - group.setAttribute('transform', skew); + (group as AnyDuringMigration).skew_ = skew; + group.setAttribute( + 'transform', + (group as AnyDuringMigration).translate_ + + (group as AnyDuringMigration).skew_); } /** @@ -202,7 +206,9 @@ export function disconnectUiStop() { if (disconnectPid) { clearTimeout(disconnectPid); } - disconnectGroup.setAttribute('transform', ''); + const group = disconnectGroup; + (group as AnyDuringMigration).skew_ = ''; + group.setAttribute('transform', (group as AnyDuringMigration).translate_); disconnectGroup = null; } }