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

sendBackwards not working when group is selected. #1189

Closed
mahadazad opened this issue Feb 23, 2014 · 8 comments
Closed

sendBackwards not working when group is selected. #1189

mahadazad opened this issue Feb 23, 2014 · 8 comments

Comments

@mahadazad
Copy link

sendBackwords on a group does not work. Even if you send the object while traversing over the group:

canvas.getActiveGroup().forEachObject(function(o) {
canvas.sendToBack(o);
});

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

@ambasador
Copy link

like that

var sendBackwards = function () {
    var activeGroupObject = canvas.getActiveGroup();
    if (activeObject) {
        canvas.sendBackwards(activeGroupObject);
    }
};

@cmawhorter
Copy link

I can confirm this in 1.4.0 and 1.4.7 (current ./dist build). 1.4.0 example: http://jsfiddle.net/BL9VL/

To reproduce:

  1. Arrange two objects on top of another object
  2. Select the two top objects
  3. Click backward

Layers remain positioned as-is. Upon deselection, the previously selected layers (group) are cloned with the correct z-index, but incorrectly positioned. The bounding box is then attached to the correctly positioned element. See this img: http://imgur.com/sKCsltH

After that, things go wonky and you can sometimes get it to appear correctly. I tried canvas.render() after, but no dice.

@kangax
Copy link
Member

kangax commented Jun 11, 2014

Yeah, z-index methods never worked with active groups

@cmawhorter
Copy link

Ok, then I guess the bug is that it doesn't abort when called on the active group?

Is the suggested workaround stepping through the active group and sending them backward one by one, or just limiting users to one layer at a time?

@matte00
Copy link

matte00 commented Jul 4, 2014

+1 👍

@lastobelus
Copy link

+1 👍

@BurkovBA
Copy link

BurkovBA commented Nov 2, 2015

+1

@asturur
Copy link
Member

asturur commented Jul 3, 2016

this is fixed. #2908

@asturur asturur closed this as completed Jul 3, 2016
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

No branches or pull requests

8 participants