Hello i try to implement a different node that will represent comment for other nodes.
The template map that i use is the following:
this.diagram.nodeTemplateMap.add("comment",
$(go.Node,
{ background: "transparent",},
$("Shape", { fill: "white" }),
$("TextBlock",
{
margin: 3,
editable: true
},
new go.Binding("text").makeTwoWay()
)
));
How can i make the width of the node to be max around 150 lets say, and if the text reach that width then break the lines of the text. also the same should happen if you resize the node.
This is my result from the above code :