-
-
Notifications
You must be signed in to change notification settings - Fork 438
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(editor): brush xywh do not behave predictably when changing lineWidth of the rotated brush element #9058
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Someone is attempting to deploy a commit to the toeverything Team on Vercel. A member of the Team first needs to authorize it. |
How to use the Graphite Merge QueueAdd the label merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
View your CI Pipeline Execution ↗ for commit dde7ea4.
☁️ Nx Cloud last updated this comment at |
4dc15ac
to
dde7ea4
Compare
@@ -138,21 +138,19 @@ export class BrushElementModel extends GfxPrimitiveElementModel<BrushProps> { | |||
instance['_local'].delete('commands'); | |||
}) | |||
@derive((lineWidth: number, instance: Instance) => { | |||
const oldBound = instance.elementBound; |
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.
Good catch! This change effectively addresses the issue mentioned, but it could be even better by fixing it with just one line of code.
const oldBound = Bound.fromXYWH(instance.deserializedXYWH);
This pull request fixes the bug with incorrect calculation xywh of the brush element when changing lineWidth when the element is rotated (see the attached video)
2025-01-22.17.46.00.mov