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

[Bug?]: Support to ActiveSelection stack operation is gone #9730

Open
ShaMan123 opened this issue Mar 13, 2024 · 6 comments · May be fixed by #9772
Open

[Bug?]: Support to ActiveSelection stack operation is gone #9730

ShaMan123 opened this issue Mar 13, 2024 · 6 comments · May be fixed by #9772

Comments

@ShaMan123
Copy link
Contributor

ShaMan123 commented Mar 13, 2024

Support to ActiveSelection stack operations is gone in v6
In v5 you could do activeSelection.sendBackwards(). Group was not interactive so all selected objects were top level objects, direct descendants of canvas, so it made sense to handle moving them in the stack.
However, in v6 a selection can contain objects from different levels of the object tree, performing stack operations on the selection will involve different stacks. It can be supported but it is a question if it should.

The issue is that it is breaking to do the following:
canvas.sendBackwards(activeSelection)

I think it might be best to make the following condition stricter:

if (idx !== 0) {

into idx > 0

From v5:
Screenshot 2024-03-13 at 13 26 40

@asturur
Copy link
Member

asturur commented Mar 13, 2024

Why you say is gone?
With top level objects is still working properly, correct?

@ShaMan123
Copy link
Contributor Author

No that I see

@asturur
Copy link
Member

asturur commented Mar 13, 2024

Ok we have to decide if it is a regression or not and what to do.

@asturur asturur changed the title [v6]: Support to ActiveSelection stack operation is gone [Bug?]: Support to ActiveSelection stack operation is gone Mar 13, 2024
@ShaMan123
Copy link
Contributor Author

In fact since we introduced the parent property it is simple to re-expose object level stack methods

@ShaMan123
Copy link
Contributor Author

Reconsidering this...
Since all the stack methods have been renamed and moved to the stack itself I don't think this is breaking or that we should support it

@asturur
Copy link
Member

asturur commented Apr 11, 2024

i didn't give much time to this issue, but for first level objects could make sense.
We don't need to rush to put it back.
Before you could select 2 objects and say, send both of those back or front for example.
If the developer is using nested selections the responsibilty of not doing it when dealing with mixed stacks is on the dev not on us, that can be clarified.
We can keep track of this and decide when we have time.

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 a pull request may close this issue.

2 participants