Hi ,
Whenever i collapse or expand my group , its inside nodes links get re-positioned . How to stop this ?
Please refer image
code we using —
$scope.myDiagram.groupTemplate =
$(go.Group, "Auto",
{ layout: $(go.TreeLayout), },
$(go.Shape, "Rectangle", { fill: null, stroke: "#00abec", strokeWidth: 7 }),
$(go.Panel, "Table",
{ margin: 0.8 }, // avoid overlapping border with table contents
$(go.RowColumnDefinition, { row: 0, background: "white" }), // header is white
$("SubGraphExpanderButton", { row: 0, column: 0, margin: 4 }),
$(go.TextBlock, // title is centered in header
{
row: 0, column: 1, font: "bold 14px Sans-Serif", stroke: "black",
textAlign: "center", stretch: go.GraphObject.Horizontal
},
new go.Binding("text")),
$(go.Placeholder, // becomes zero-sized when Group.isSubGraphExpanded is false
{ row: 1, columnSpan: 2, padding: 5, alignment: go.Spot.TopLeft },
new go.Binding("padding", "isSubGraphExpanded",
function (exp) {
return exp ? 10 : 0;
}).ofObject())
)
);
// used for realign the diagram after collapsing view
$scope.myDiagram.layout = $(go.LayeredDigraphLayout,
{ direction: 90, layerSpacing: 10, isRealtime: true });
$scope.myDiagram.initialContentAlignment = go.Spot.Center;
// end Group