-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Make cleaner setCoords and geometry code #1882
Conversation
@kangax Lots of error come out since i moved mtr calculation in setCoords method. ok it was related to _calBounds method in group.class.js Did you ever thought that controls made by circle would made a lot of things easier? |
@kangax i'm done. check if you are interested in this. |
}, | ||
|
||
_calculateCurrentDimensions: function(transform) { |
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.
shouldTransform
is better, to indicate that it's boolean
@asturur LGTM. Just please please make sure that everything still works — all the demos, front page of fabricjs.com, grouping, iText, etc. |
i have first to clone the repo and install ruby. |
Is this good to go? |
/cc @asturur |
I did not do all that test suite. |
Ok |
This code looks to no harm to me, i did check trought all the tests and they look visually the same., |
Make cleaner setCoords and geometry code
@knagax This PR is mainly about code clean up.
3 methods have been shrunk. Code duplication has been removed and setCoords mad ligther.
Just 4 corners are calculated using the transformation with vpt the other are find "interpolating"
mtr before was a copy of mt , and then made correct in setCornerCoords, now is calculated correct and _setCornerCoords is made simpler.