I need to add an associated shape on the side of each node. However, I still would like to make the selection box surrounding only node itself so that I don’t want to this associated part be within my selection box. So I think adornment should be the right choice? But how should I make adornment showing at all time? I only see examples when hovering over show a customized adornment by using addAdornment from this example GoJS/hoverButtons.html at 4f48dfc71869dfc01419ab0b563d49bab56fcd35 · NorthwoodsSoftware/GoJS · GitHub. I would like to make it showing all the time as long as the node is displayed. Any idea? Thanks.
I tried to put it in the nodeTemplateMap while creating diagram, but it seems not work.
let telemetryAdornment: go.Adornment =
this.$(go.Adornment, "Auto",
this.$(go.Shape, "RoundedRectangle",
{
fill: "lightgreen",
desiredSize: new go.Size(50, 50)
}
),
this.$(go.Placeholder));
telemetryAdornment.adornedObject = newDiagram.nodeTemplateMap.get(NodeCategories.START);
newDiagram.nodeTemplateMap.get(NodeCategories.START).addAdornment("telemetryAdornment", telemetryAdornment);
-Chuan