I mean when I define my port variable like below I can create new links by mouse-drag, but I can’t display $(go.TextBlock, name, on the screen.
var port = $(go.Panel,"Auto",
$(go.Shape, "Rectangle",
{fill: "darkorange", stroke: "white",
desiredSize: new go.Size(9 + portSize * (7), 18),
portId: name,
toMaxLinks: 1,
cursor: "pointer"
},
),
$(go.TextBlock, name, // portname inside the node
{
stroke: "white",
font: "8pt sans-serif"
}
));
As you can see I can create new nodes by dragging existing links. But I can’t see port names in those orange boxes.
When I modify it to this:
var port = $(go.Shape, "Rectangle",
{fill: "darkorange", stroke: "white",
desiredSize: new go.Size(9 + portSize * (7), 18),
portId: name,
toMaxLinks: 1,
cursor: "pointer"
},
)
$(go.TextBlock, name, // portname inside the node
{
stroke: "white",
font: "8pt sans-serif"
}
);
I can see the port names but dragged link doesn’t connect to the node
6.
Is there a way to create new links by mouse-drag without losing the
TextBlock?
Your help will be very much appreciated.
Thanks.