How to forbid resizing of the text editor?
by cfarmerga
HTML
<script src="https://gojs.net/latest/release/go.js"></script>
<div id="sample">
<div id="myDiagram" style="border: solid 1px black; width:100%; height:400px"></div>
</div>
JavaScript
init();
function init() {
var $ = go.GraphObject.make;
myDiagram =
$(go.Diagram, "myDiagram",
{
initialContentAlignment: go.Spot.Center,
});
var nodeTemplate = $(go.Node, "Vertical",
{
fromSpot: go.Spot.Right,
toSpot: go.Spot.Left
},
new go.Binding("location", "loc"),
$(go.Panel, "Auto",
{
},
$(go.TextBlock,
{
desiredSize: new go.Size(200, 150),
alignment: go.Spot.TopLeft,
textAlign: 'left',
isMultiline: true,
text: 'This is some really, really, really, really, really, really, really, really, really, really, really, really, really, really quite long text content',
wrap: go.TextBlock.WrapDesiredSize,
overflow: go.TextBlock.OverflowEllipsis,
editable: true
}
)
)
);
var model =
$(go.GraphLinksModel,
{
nodeDataArray: [
{ key: "One", loc: new go.Point(100, 150) }
]
});
myDiagram.nodeTemplate = nodeTemplate;
myDiagram.model = model;
}