Open JensWinkler91 opened 1 year ago
I will support as soon as possible
I think you should call canvas.addGroup
, but not Group.addGroups
.
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.
canvas.addGroup({
id: 'xxx',
group: 'xxx' // you can pass group id
})
@noonnightstorm
Your code sample would create a new subgroup, 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
and Group.removeGroups
are really missing.
Maybe you can canvas.removeGroups
and canvas.addGroups
.
I already tried it but it does not work.
When i use canvas.removeGroups
and canvas.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.
@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?
@noonnightstorm
I would really appreciate your help in this case. Is there any chance to get a response?
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 likegroup.addGroups(groups)
.Do i miss something?