Resizing, draw Links

Hello, I have a Node
This Node is resizable only in horizontal direction.

How can I make only the Red line from/to Linkable. The Red line should change its size with the whole Node.
Here the code:
myPalette.nodeTemplateMap.add("B", $(go.Node, "Auto", { resizable: true, resizeObjectName: "SHAPE", locationObjectName: "SHAPE", resizeAdornmentTemplate: // specify what resize handles there are and how they look $(go.Adornment, "Spot", $(go.Placeholder), // takes size and position of adorned object $(go.Shape, "Circle", // left resize handle { alignment: go.Spot.Left, cursor: "col-resize", desiredSize: new go.Size(9, 9), fill: "lightblue", stroke: "dodgerblue" }), $(go.Shape, "Circle", // right resize handle { alignment: go.Spot.Right, cursor: "col-resize", desiredSize: new go.Size(9, 9), fill: "lightblue", stroke: "dodgerblue" }) ), selectionAdorned: false }, // don't show selection Adornment, a rectangle $(go.Shape, "RoundedRectangle", { name: "SHAPE", fill: "#333745", width: 50, height: 10, minSize: new go.Size(10, 10) }), $(go.Shape, "RoundedRectangle", { fill: "RED", stroke: null, // this is changed to "white" in the showPorts function desiredSize: new go.Size(100, 3) } ) ));

sorry, can’t do correct syntax highlighting
here more comfortable:

On that “red” Shape, set:

  { portId: "", fromLinkable: true, toLinkable: true }

On a separate issue, it’s not usually a good idea to have the user resize the main element of an “Auto” Panel. Either have the user resize the whole panel (in your case the whole node) or the inner element (in your case the “red” shape).

To do that, either remove the Part.resizeObjectName or set that property to refer to the “red” Shape.

In the former case you’ll probably not want to set the desiredSize.width on that “red” Shape (so just set height to 3), and you’ll probably want the “red” Shape to stretch horizontally (set stretch to go.GraphObject.Horizontal).

Please read the discussion at GoJS Tools -- Northwoods Software. Note that the examples that have the user resizing the main element do so not in an “Auto” Panel.