What problem does this feature solve?
The API allows us to manually add nodes to a group by using group.addNodes(nodes).
However, i can't find any function to add a subgroup to a group although the feature is supported (see includeGroups
). I'd expect that there's a function like group.addGroups(groups)
.
Do i miss something?
9条答案
按热度按时间icnyk63a1#
I will support as soon as possible
vjrehmav2#
I think you should call
canvas.addGroup
, but notGroup.addGroups
.sqougxex3#
But
canvas.addGroup
would add a new group to the canvas. That's not what i want to do.I just want to change the parent of a group that already exist.
Afterwards the subgroup should me moved when the parent group is moved.
uyto3xhc4#
zpjtge225#
@noonnightstorm
Your code sample would create anewsubgroup, right?
I'd like to turn an existing group into a subgroup.
Edited:
I tried your code snippet. It doesn't work.
I think the functions
Group.addGroups
andGroup.removeGroups
are really missing.t9eec4r06#
Maybe you can
canvas.removeGroups
andcanvas.addGroups
.g52tjvyc7#
I already tried it but it does not work.
When i use
canvas.removeGroups
andcanvas.addGroups
the nodes won't be part of the group anymore.That means that the nodes of the group don't move when i move the group itself.
o2gm4chl8#
@noonnightstorm
I currently don't get the problem with that issue as the behavior already exists when you drag and drop a group into another group.
Could you please tell me what's the difficulty?
bis0qfac9#
@noonnightstorm
I would really appreciate your help in this case.
Is there any chance to get a response?