I can’t seem to figure this up. I have a node like on picture
What I want to achieve is
- Be able to activate line drawing only outside of red area.
- Clicking on inside of it would move the node around.
- Also line connecting the node needs to follow the node borders.
Currently entire node is activating line drawing, so I cannot move it around.
My Code:
var groupTemplate =
$(go.Node, "Vertical",
{ defaultStretch: go.GraphObject.Horizontal },
{
//fromSpot: go.Spot.RightSide, toSpot: go.Spot.LeftSide
portId: "",
fromLinkable: true,
toLinkable: true,
fromEndSegmentLength: 20,
toEndSegmentLength: 20,
cursor: "pointer"
},
$(go.Panel, "Auto",
$(go.Shape, "RoundedTopRectangle",
{
fill: "#C2C2C2",
stroke: "#C2C2C2",
//height: 25,
},
new go.Binding("fill", "lightgray")),
$(go.TextBlock,
{
margin: new go.Margin(4, 20, 4, 20),
textAlign: "center",
font: "10pt Roboto",
},
new go.Binding("text", "header"))
),
$(go.Panel, "Auto",
{ minSize: new go.Size(NaN, 70) },
$(go.Shape, "RoundedBottomRectangle",
{
fill: "white",
stroke: "#C2C2C2"
}),
$(go.TextBlock,
{
stroke: "#C2C2C2",
width: 120
},
{ margin: new go.Margin(2, 2, 0, 2), textAlign: "center" },
new go.Binding("text", "lsabel"))
)
);