This is my group template
myDiagram.groupTemplateMap.add(‘grupo_panel_tree’,
GO(go.Group, “Auto”,
{
ungroupable: true,
mouseDragEnter: function(e, grp, prev) { highlightGroup(e, grp, true); },
mouseDragLeave: function(e, grp, next) { highlightGroup(e, grp, false); },
computesBoundsAfterDrag: true,
mouseDrop: finishDrop,
handlesDragDropForMembers: true,
layout: layoutTree
},
new go.Binding(“location”, “loc”).makeTwoWay(),
new go.Binding(“isSubGraphExpanded”, “expanded”).makeTwoWay(),
GO(go.Shape, “Rectangle”, { fill: null, stroke: “gray” }, new go.Binding(‘fill’,‘color’)),
GO(go.Panel, “Table”, { margin: 0.5 },
GO(go.RowColumnDefinition, { row: 0, background: “white” }),
GO(“SubGraphExpanderButton”, { row: 0, column: 0, margin: 3 }),
GO(go.TextBlock, { margin: 5, editable: false , row: 0, column: 1, font: “bold 13px Sans-Serif”, stroke: “black”, textAlign: “left”, stretch: go.GraphObject.Horizontal } ,
new go.Binding(“text”)
),
GO(go.Placeholder, { row: 1, columnSpan: 2, padding: 50, alignment: go.Spot.TopLeft },
new go.Binding(“padding”, “isSubGraphExpanded”,
function(exp) {
return exp ? 25 : 10;
}
).ofObject()
)
)
));