Hi,
I have implemented same as you have sugested. But while its loading in this mode the go library is running infinite loop and getting message as in image. Below are the which I am using for the same,
myDiagram.layout =
GO(go.TreeLayout, {
treeStyle: go.TreeLayout.StyleLastParents,
arrangement: go.TreeLayout.ArrangementHorizontal,
// properties for most of the tree:
angle: 90,
layerSpacing: 35,
// properties for the “last parents”:
alternateAngle: 90,
alternateLayerSpacing: 35,
alternateAlignment: go.TreeLayout.AlignmentBus,
alternateNodeSpacing: 20,
isInitial: $(’.hdnIsAutoAlign’).val().toLowerCase() === ‘true’ ? true : false,
isRealtime: false, sorting: go.TreeLayout.SortingAscending
}, { comparer: keyCompare } //{ comparer: go.LayoutVertex.smartComparer },
);
// define the group template
myDiagram.groupTemplateMap.add("CommandSectionGroup",
GO(go.Group, "Auto",
{ locationSpot: go.Spot.Center },
new go.Binding("location", "location", function (location) {
return new go.Point(location.x, location.y)
}).makeTwoWay(),
and below setting location,
if ($('.hdnIsAutoAlign').val().toLowerCase() === 'false')
{
if (loc !== null && loc !== undefined) {
var position = loc.split(' ');
/setting default values
var location = {
x: 200,
y: 300,
}
if (position.length > 0) {
location = {
x: position[0],
y: position[1],
}
}
}
}
else {
isAutoAllignOn = true;
}
return location;
}
