While scrolling the rows, the links seems to be pointing to the empty space as we are increasing the rows.
we are looking forward for any solution which would rectify this problem.
Script:
function init() {
if (window.goSamples) goSamples(); // init for these samples – you don’t need to call this
var $ = go.GraphObject.make;
myDiagram =
$(go.Diagram, "myDiagram",
{ initialContentAlignment: go.Spot.Center,
// layout: $(go.TreeLayout,
// { angle: 0, sorting: go.TreeLayout.SortingAscending })
});
// myDiagram.toolManager.mouseDownTools.add(new RowResizingTool());
// myDiagram.toolManager.mouseDownTools.add(new ColumnResizingTool());
myDiagram.nodeTemplate =
$(go.Node, "Auto",
new go.Binding("location", "loc", go.Point.parse).makeTwoWay(go.Point.stringify),
{
selectionObjectName: "SCROLLING",
resizable: true,
resizeObjectName: "SCROLLING"
},
$(go.TextBlock,
{ font: "bold 14px sans-serif" },
new go.Binding("text", "key")),
// $(go.Shape, { fill: "white" }),
$("ScrollingTable",
new go.Binding("TABLE.itemArray", "items"),
{
name: "SCROLLING",
desiredSize: new go.Size(NaN, 60),
"TABLE.itemTemplate":$(go.Panel, "TableRow", new go.Binding("portId", "name"), { background: "transparent",
fromSpot: go.Spot.Right,
toSpot: go.Spot.Left,
fromLinkable: true, toLinkable: true },
$(go.TextBlock, {
column: 2,
margin: new go.Margin(0, 2),
stretch: go.GraphObject.Horizontal,
font: "bold 13px sans-serif",
wrap: go.TextBlock.None,
overflow: go.TextBlock.OverflowEllipsis,
fromLinkable: false, toLinkable: false
}, new go.Binding("text", "name"))),
"TABLE.defaultColumnSeparatorStroke": "gray",
"TABLE.defaultColumnSeparatorStrokeWidth": 0.5,
"TABLE.defaultRowSeparatorStroke": "gray",
"TABLE.defaultRowSeparatorStrokeWidth": 0.5,
"TABLE.defaultSeparatorPadding": new go.Margin(1, 3, 0, 3)
}
)
);
// myDiagram.model = new go.GraphLinksModel(,);
myDiagram.model =
this.$(go.GraphLinksModel, { linkFromPortIdProperty: "fromPort",
linkToPortIdProperty: "toPort",
nodeDataArray: [
{ key: "Alpha", items:
[
{ name: "A", value: 1 },
{ name: "B", value: 2 },
{ name: "C", value: 3 },
{ name: "D", value: 4 },
{ name: "E", value: 5 },
{ name: "F", value: 6 },
{ name: "G", value: 7 }
]
},
{
key: "Beta", items:
[
{ name: "Aa", value: 1 },
{ name: "Bb", value: 2 },
{ name: "Cc", value: 3 },
{ name: "Dd", value: 4 },
{ name: "Ee", value: 5 },
{ name: "Ff", value: 6 },
{ name: "Gg", value: 7 },
{ name: "Hh", value: 8 },
{ name: "Ii", value: 9 },
{ name: "Jj", value: 10 },
{ name: "Kk", value: 11 },
{ name: "Ll", value: 12 },
{ name: "Mm", value: 13 },
{ name: "Nn", value: 14 }
]
}
]
});
}