Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 6972

Adding group to model object

$
0
0

@ramesh1 wrote:

Hi,

I am grouping objects using groupSelection(). But this grouping was not reflected in the diagram model object. so i tried the using the below in the contextmenu button click event.
var linkDataArray = [{ key: "Omega", isGroup: true }];

                   var iteration = e.diagram.selection.iterator;

                   wiDiagram.startTransaction('modified group');
                   while (iteration.next()) {
                       wiDiagram.model.setDataProperty(iteration.value, "group", "Omega");
                   }
                   wiDiagram.commitTransaction('modified group');
                   wiDiagram.model = new go.GraphLinksModel(linkDataArray);

The above code doesnt create group. Kindly guide me

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6972

Trending Articles