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

Object corner points in multiselection not calculated correctly #6826

Closed
acdvs opened this issue Jan 22, 2021 · 4 comments · Fixed by #6798
Closed

Object corner points in multiselection not calculated correctly #6826

acdvs opened this issue Jan 22, 2021 · 4 comments · Fixed by #6798
Labels

Comments

@acdvs
Copy link

acdvs commented Jan 22, 2021

Version

4.3.0

Test Cases

https://jsfiddle.net/b20puesy/
https://jsfiddle.net/24a35vtj/

Information about environment

Latest Chrome and JSFiddle

Steps to reproduce

Explained in the JSFiddles above (reproduction depends on which way the code is written).

Expected Behavior

When using Object.isOnScreen and Canvas.remove to remove objects outside the canvas bounds, objects in a multiselection should be removed when dragged outside canvas bounds.

Actual Behavior

When using Object.isOnScreen and Canvas.remove to remove objects outside the canvas bounds, objects in a multiselection will either unexpectedly disappear or not be removed at all. See test cases above.

@acdvs acdvs changed the title Objects in multiselection not being removed in certain cases Object corner points in multiselection not calculated correctly Jan 23, 2021
@acdvs
Copy link
Author

acdvs commented Jan 23, 2021

After further investigation it looks like this is a problem with the underlying coordinate calculation and not the Object.isOnScreen method itself. Updating the issue to reflect this.

@asturur
Copy link
Member

asturur commented Jan 23, 2021

yes object in multi selections have the 4 main corners relative to the group they are in, isOnScreen could have a slower path to take that into account

@acdvs
Copy link
Author

acdvs commented Jan 23, 2021

Could you explain what you mean? I'm not sure I understand.

Here's another JSFiddle showing the bug. Select and move each group of objects. The left group is calculated correctly while the right group isn't.

@asturur
Copy link
Member

asturur commented Jan 27, 2021

i mean that object.isOnscreen should be fixed to work in the use case you are mentioning

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.

2 participants