I had a visual tree diagram and for tree node i need to display context items
and to display that menu item there some conditions if that condition fails i should not display that particular item.
below is the code
this.goMaker(go.TextBlock,
{
font: "bold 14px Muli-Regular",
stroke: "#333d46",
margin: 10,
width: 120,
height: 45,
maxLines: 1,
overflow: go.TextBlock.OverflowEllipsis,
text: "alignment: Left",
alignment: go.Spot.Left,
verticalAlignment: go.Spot.Top
},
new go.Binding("text", "name"),
{ contextMenu: this.goMaker("ContextMenu", this.contextmenuitems) },
);
for the contextmenuitems i will load items on condition. if i add
that i getting the below error
Cannot add a GraphObject that already belongs to another Panel to this Panel: Panel(Auto)#412, already contained by Adornment(), cannot be shared by this Panel: Adornment()