antvis / G

💥 A flexible rendering engine for visualization.
https://g.antv.antgroup.com/
1.04k stars 192 forks source link

fix: remove defXY and cx/cy should not affect transform #1624 #1627

Closed xiaoiver closed 3 months ago

xiaoiver commented 5 months ago

🤔 This is a ...

🔗 Related issue link

1624

💡 Background and solution

目前以下属性均会影响 transform,不光会增加初始化阶段的时间影响性能,也会让 transformOrigin 这样的属性变得晦涩。

GUI / G2 中由该问题引发了不少问题:

因此在 group & customElement 去除 x/y 属性,同时去除 anchor 属性。 值得一提的是在 SVG 规范中 也是没有 x/y 属性的:https://developer.mozilla.org/en-US/docs/Web/SVG/Element/g

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge