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

Make possible to use stack operation with multiple selections #1301

Closed
spyridonas opened this issue Apr 30, 2014 · 3 comments · Fixed by #2908
Closed

Make possible to use stack operation with multiple selections #1301

spyridonas opened this issue Apr 30, 2014 · 3 comments · Fixed by #2908
Assignees
Labels

Comments

@spyridonas
Copy link

I was trying to keep a single object on top of everything on my project , and noticed that the group selection does not respect the "sendToFront()" of my object. After some experimenting i discovered (and you can do it in the kitchensink of fabric) that if you select 2 object as group with your mouse and type in the console "canvas.getActiveGroup().sendToBack()" the two objects duplicate with an offset and by selecting and moving one of them you actually move the cloned one too.
This bug aside , is it possible to have a specific object always on top of everything? As of right now i captured the events for everything on fabric (object:selected, moved,rotated, etc) and force my desired object on top using bringToFront() but it doesn't work with group. As i understand groups have other order of appearance than Objects.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@spyridonas
Copy link
Author

Any help?

@av01d
Copy link

av01d commented Jun 2, 2014

This is an old bug, that's apparently still unfixed. I am running into this issue today again (not the first time), using FabricJS 1.4.0. Can someone take a look and (try to) fix this?
Looping through all objects in the group (via forEachObject) does not help.
Same issue for all z-index related functions: sendBackwards, bringForward, sendToBack, bringToFront.

@asturur asturur self-assigned this Apr 25, 2016
@asturur
Copy link
Member

asturur commented Apr 25, 2016

I'm going to track this now, i know you are probably not interested anymore, but yes it should be fixed.

I think that if we send to back or to top or forward an active group, we should just cycle to all the elements of the group and move them in the stack.

@asturur asturur changed the title Group selection clones itself when trying to execute sendToBack() on the group Make possible to use stack operation with multiple selections Apr 26, 2016
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.

4 participants