const roundedRectangleTemplate = $(
go.Node,
$(
go.Panel,
"Spot",
$(
go.Panel,
"Spot",
$(go.Shape, "RoundedRectangle", {
width: 200,
height: 150,
fill: "white",
stroke: "#E4E5E8",
shadowVisible: true,
parameter1: 12,
}),
$(go.Shape, "Circle", {
cursor: "pointer",
fill: "transparent",
stroke: "transparent",
width: 1,
height: 1,
portId: TO_PORT,
alignment: go.Spot.Left,
toSpot: go.Spot.Left,
toLinkable: true,
}),
$(go.Shape, "Circle", {
fill: "transparent",
stroke: "transparent",
width: 1,
height: 1,
portId: FROM_PORT,
alignment: go.Spot.Right,
fromSpot: go.Spot.Right,
fromLinkable: true,
name: "FROMPORTGO",
}),
),
new go.Binding("location", "location", go.Point.parse).makeTwoWay(
go.Point.stringify
)
);
above is a sample template of the node, when i draw a temporary link over the right edge or anywhere inisde the node, i want the link to snap to the node’s to port.
currently it only snaps if i am close the toport of the node, but i want it such that hovering anywhere inside the node with a temporary link, it should snap to the to_port of the node.
is this possible ?