Skip to content

Commit

Permalink
chore: fix mutator blocks jumping (#6559)
Browse files Browse the repository at this point in the history
* chore: fix mutator blocks jumping

* chore: format
  • Loading branch information
BeksOmega authored and cpcallen committed Oct 19, 2022
1 parent 5f42361 commit d57a277
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions core/block_animations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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_);
}

/**
Expand All @@ -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;
}
}

0 comments on commit d57a277

Please sign in to comment.