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

getBoundingRect of objects in an active selection weird #4778

Closed
blobinabottle opened this issue Mar 2, 2018 · 3 comments · Fixed by #7859
Closed

getBoundingRect of objects in an active selection weird #4778

blobinabottle opened this issue Mar 2, 2018 · 3 comments · Fixed by #7859

Comments

@blobinabottle
Copy link
Contributor

Version

2.0.2

Test Case

https://jsfiddle.net/blobinabottle/9h239bak/8/

Steps to reproduce

Select one object and rotate it to see bounding rect: that's nice.
Select multiple objets and rotate and check the bounding rect: weird.
When deselected bounding renders correctly.
See short video here https://cl.ly/273y0n3B1C14

Expected Behavior

I would like to get the correct bounding area even when objects in selection.

Actual Behavior

It gives bouding area of object as it's relative to the group. I understand the logic, I could calculate the correct position of bounding box but when you apply rotation it becomes very difficult and could be really useful to get an option to have the absolute bounding rect even if object into an active selection (or a group).

Do you have a (easy) magic trick to get this in the way I like? :-) Or it implies to rework the whole logic of active selection / group?

@blobinabottle
Copy link
Contributor Author

This is how I solved it
https://jsfiddle.net/9h239bak/87/
I unselect before rendering the bounding box if the object is in active selection. Like that the objects keep getting the correct bounding box. Don't know if it's the best way to do it.

@blobinabottle
Copy link
Contributor Author

So to be clear: now the expected behavior: https://cl.ly/1v223C211b2O
Before the bounding rect is draw outside the canvas: https://cl.ly/3H0w1P3p2R3O

@asturur
Copy link
Member

asturur commented Mar 16, 2018

there have been ongoing discussion about this in the past, maybe there is also some other issue opened.
I agree that there may be an adhoc method to get it, should be simple

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

Successfully merging a pull request may close this issue.

3 participants