Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update to g@6.0 for better performance #6149

Merged
merged 15 commits into from
Apr 8, 2024
4 changes: 2 additions & 2 deletions src/animation/morphing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function shapeToShape(
// Replace first to get right bbox after mounting.
replaceChild(to, from);

const keys = [...attributeKeys];
let keys = [...attributeKeys];
if (from.nodeName === Shape.GROUP) {
// Apply translate and scale transform.
const [x0, y0, w0, h0] = localBBoxOf(from);
Expand All @@ -94,7 +94,7 @@ function shapeToShape(
const sy = h0 / h1;
fromTransform = `translate(${dx}, ${dy}) scale(${sx}, ${sy})`;
} else {
keys.push(...GEOMETRY_ATTRIBUTES[from.nodeName]);
keys = keys.concat(GEOMETRY_ATTRIBUTES[from.nodeName] || []);
xiaoiver marked this conversation as resolved.
Show resolved Hide resolved
}

const keyframes = [
Expand Down
Loading