Hi guys,
first of all, thank you for a great library, I think it really fulfills all of my needs for my next project … hopefully;)
I’ve set up the Flowchart example, and would like to add groups to the JSON feed, so that I can expand/collapse groups and save those settings in a database.
- I’ve added the TreeExpanderButton to the NodeTemplateMap.
- Then I’ve added the
myDiagram.groupTemplate = $(go.Group, go.Panel.Auto, {
minSize: new go.Size(50, 100)
}, new go.Binding("location", "location", go.Point.parse).makeTwoWay(go.Point.stringify), $(go.Shape, {
fill: null,
stroke: "blue",
strokeWidth: 2
}),
$(go.Panel, go.Panel.Table, {
name: "TABLE",
margin: 0
},
new go.Binding("visible", "isSubGraphExpanded").ofObject(),
$(go.Placeholder, {
row: 1,
background: "transparent",
padding: 5
})),
$("SubGraphExpanderButton", {
alignment: new go.Spot(0, 0)
}));
- And then the two way databinding
new go.Binding("isSubGraphExpanded", "expanded").makeTwoWay(),
but when I “Save” the JSON feed and “Load” it again, the nodes are not collapsed
Thanks
Kasper