How to enable text block to overflow out of a Node


I have a textblock in a node and when the user enters a large text I want the text to overflow out of the node rather than expand the node itself.

I have this sample source here

var $ = go.GraphObject.make;

        diagram =
          $(go.Diagram, "myDiagramDiv");

        diagram.nodeTemplate =
    $(go.Node, "Auto",
      $(go.Shape, "Rectangle",
            fill: '#AC193D'
        }, new go.Binding('background', 'isSelected', function (sel) {
            if (sel) {
                return '#424949';
            } else {
                return 'transparent';
      $(go.Panel, "Table",
        { defaultAlignment: go.Spot.Left, margin: 4 },
        $(go.RowColumnDefinition, { column: 1, width: 4 }),

          { row: 1, column: 0, alignment: go.Spot.Center, margin:(10,10,10,10) },
          new go.Binding("text", "prop2"))

        diagram.model.nodeDataArray = [
          { key: "Alpha", prop1: "value of 'prop1'", prop2: "Test11111112222222222222222123ddddddddddddddddddddd    " }

The first half of the image is what I am getting from the script. I am trying to get a node template which would match the second part of the Image.


Don’t use an “Auto” Panel, which is used to implement borders around elements.

I suggest that you use a “Spot” Panel. Position the TextBlock by setting its GraphObject.alignment property.

2 posts were split to a new topic: How to put text on top of rest of node?