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

Uniform stroke pushes bounds too far #7651

Open
kirill-konshin opened this issue Feb 5, 2022 · 14 comments
Open

Uniform stroke pushes bounds too far #7651

kirill-konshin opened this issue Feb 5, 2022 · 14 comments
Labels

Comments

@kirill-konshin
Copy link

Version

4.6.0

Test Case

https://jsfiddle.net/dfuse/Lwpfkrx1/

Steps to reproduce

Create a path with stroke and put it inside group, set uniform stroke to false. Select the group.

You can click "Toggle uniform" and "Toggle stroke width" to see different combinations.

Expected Behavior

Selection should stick to border of stroke.

image

Actual Behavior

image

Background

When I observed this behavior, I thought it might be useful to introduce a proper inner stroke, as mentioned here #2378 so that with uniform stroke the size of stroke won't affect any dimensions.

@asturur
Copy link
Member

asturur commented Feb 5, 2022

This is a known issue, this is probably going away with the group rewrite.

@asturur
Copy link
Member

asturur commented Feb 5, 2022

For reference #6705

@ShaMan123
Copy link
Contributor

@asturur is this related to the fix of #7476?

@ShaMan123
Copy link
Contributor

I see strokeUniform is buggy across fabric

@ShaMan123
Copy link
Contributor

related #7605 ?

@ShaMan123
Copy link
Contributor

@kirill-konshin did you try #7639 ?

@asturur
Copy link
Member

asturur commented Feb 7, 2022

Well buggy across fabric is maybe an exageration :)
It does not work inside groups, but probably with the group rewrite this is going to change a bit.

@ShaMan123
Copy link
Contributor

ShaMan123 commented Feb 7, 2022

😳
I guess so

@asturur
Copy link
Member

asturur commented Feb 7, 2022

@asturur is this related to the fix of #7476?

No, but your code could use take in consideration strokeUniform, since we are not doing that.

The truth is that strokeUniform is a patch, while the real solution is probably to transform path's and polygon's points to absorbe the transformation.

strokeUniform does not apply to text either. Or if it does we are patching it manually.

Is probably safer with controlApi to build something that change the path data while you transform it, rather than having strokeUniform work consistently.

@kirill-konshin
Copy link
Author

kirill-konshin commented Feb 8, 2022

"transform path's and polygon's points to absorbe the transformation" I tried that, the problem is that when shape is scaled, I have to recalculate the path at least once after scaling is finished, so path "jumps" to new place.

I can recalculate at 60fps, but this may not perform well...

@stale
Copy link

stale bot commented Mar 27, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue marked as stale by the stale bot label Mar 27, 2022
@kirill-konshin
Copy link
Author

Not stale. Still needs to be addressed.

@ShaMan123 ShaMan123 added bug and removed stale Issue marked as stale by the stale bot labels Mar 30, 2022
@Errin890
Copy link

Errin890 commented Oct 3, 2022

Any updates on this issue?

@ShaMan123
Copy link
Contributor

#8040 #8344

@ShaMan123 ShaMan123 linked a pull request May 7, 2023 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants