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

bringForward & sendBackward problem with Group #4082

Closed
ncou opened this issue Jul 9, 2017 · 4 comments · Fixed by #4119
Closed

bringForward & sendBackward problem with Group #4082

ncou opened this issue Jul 9, 2017 · 4 comments · Fixed by #4119
Labels

Comments

@ncou
Copy link
Collaborator

ncou commented Jul 9, 2017

Hi,

There seems to be strange behavior with the sendBackward and bringForward when you use it on groups.

Here is the steps :
http://jsfiddle.net/uV4E2/50/

  1. open the fiddle
  2. select the text + the red rect to have a group selection
  3. click on bringForward 1 time => it's ok the red rect is now over the circle
  4. click another time on the bringForward button => The red rect is now over the text object => it's seems ok, even if it's strange the z-index position change in the object group, it seems more logical to increate by 1 each z-index, and keep the order maintened inside the group.
  5. try to send backward by clicking the buttons => i doesn't work. impossible to send backward the group.

Same problem if you create the same group, and click 2 times on sendBackward, in this case clicking on the bringForward doesn't do anything.

PS : I also tried with the latest source and there is still this problem. And by the way it seems like the toDataURL is broken, because the thumbnail in my app are always transparent with this lib build version (it was fine with the previous build 5 days ago). It's not an official release so perhaps it's normal and already know by you.

@asturur asturur added the bug label Jul 10, 2017
@asturur
Copy link
Member

asturur commented Jul 10, 2017

if you destroy and recreate the selection then it works.
Hopefully is a real small thing

@ncou
Copy link
Collaborator Author

ncou commented Jul 10, 2017

yes deselect and recreate the selection seems to reset the possibility to bringForward.

@asturur
Copy link
Member

asturur commented Jul 22, 2017

so once objects are swapped, during bring forward/backward the problem occurs.
This happen because they get processed in the group order, but the order on canvas is different.

@asturur
Copy link
Member

asturur commented Jul 22, 2017

ok fixed! also the send backwards was affected by same bug.

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