-
-
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
obj.getBoundingRect returns old value after modifing selection #4540
Comments
For what I understand it's the logic of fabric: activeSelection apply its transform only when you deselect. That's the same for a group, you'll only apply transforms to child of a group when ungrouping. You need to apply the transform of the activeSelection itself to the objects into the selection. |
So activeSelection is just a facade to be able the code of a single object to move around multiple objects without going crazy with code changes. Is also comfortable because the activeSelection transform is going to transform the canvas and give us the illusion of transforming the objects. There is no a method to calculate the bbrect outside of a group of an activeSelection, i think we should just make it. Now going to naming, as always, that is not easy. We are using the word absolute for getting a bbrect that represent the bbrect in canvas coordinate when the zoom and padding are neutral, and skipping the control padding. using a third boolean looks terrible to me, any other idea? |
http://jsfiddle.net/2wnx60za/1/ |
Version
Tested on 1.7.20, 2.0.0-rc.3
Test Case
http://jsfiddle.net/w1uk1r8j/
Steps to reproduce
Expected Behavior
B differs from A.
Actual Behavior
B[i].width === A[i].width; B[i].height === A[i].height
If it is not a bug, how can I get new bounding rects?
The text was updated successfully, but these errors were encountered: