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

Remove old strokeWidth calculation #2155

Merged
merged 1 commit into from
May 3, 2015
Merged

Remove old strokeWidth calculation #2155

merged 1 commit into from
May 3, 2015

Conversation

asturur
Copy link
Member

@asturur asturur commented Apr 28, 2015

Need to fix all the tests...

closes #1929

@asturur
Copy link
Member Author

asturur commented May 2, 2015

@kangax, after a bit of thinking i realized that strokeWidth = 1 and stroke = none is the good default. Is the same also in SVGs, so if we do not respect that all the svg import will fail or whe should change all the "fromElement" functions to add strokeWidth = 1 if not differently specified.

The only place where i switched to strokeWidth = 0 is the group class. In this case stroke is not rendered and is useless to have it to 1 making the group width and height calculation unexpected ( one object with width 101 and group should have bounding rect 101 wide, not 101 + 1).

I fixed the test with less changes possible, if you agree i do not have anything more to add you can pull.

kangax added a commit that referenced this pull request May 3, 2015
Remove old strokeWidth calculation
@kangax kangax merged commit 5d6cd9b into fabricjs:master May 3, 2015
@kangax
Copy link
Member

kangax commented May 3, 2015

@asturur please add to changelog

@asturur asturur deleted the fixingstrokewidth branch May 3, 2015 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong calculation of bounding rect
2 participants