-
Notifications
You must be signed in to change notification settings - Fork 201
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
fix: remove defXY and cx/cy should not affect transform #1624 #1627
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are accessibility issues in these changes.
/** | ||
* <pattern> | ||
* support the following image source: | ||
* * HTMLImageElement (<img>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This image is missing a text alternative. This is a problem for people using screen readers.
export async function pattern({ canvas }) { | ||
await canvas.ready; | ||
|
||
// <img> URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This image is missing a text alternative. This is a problem for people using screen readers.
canvas.appendChild(rect4); | ||
|
||
{ | ||
// HTMLImageElement(<img>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This image is missing a text alternative. This is a problem for people using screen readers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
* fix: remove defXY and cx/cy should not affect transform #1624 (#1627) * fix: remove defXY and cx/cy should not affect transform #1624 * fix: patterns * fix: remove anchor * fix: annotation plugin * chore: commit changeset * fix: x/y in rect can be omitted * chore: commit changeset * chore: version * chore: version * chore: bump version * fix: insert event will trigger by default * chore: commit changeset * fix: lazy update geometry * fix: lazy calculate geometry * chore: bump version * fix: refactor parse transform * fix: transform origin * chore: bump * chore: stash * chore: bump test version * chore: fix testcases * chore: update snapshots * chore: commit changeset * chore: commit changeset (#1646) * chore(release): bump version (#1645) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
🤔 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
☑️ Self Check before Merge