Hi
how can i make Link label selectable by clicking on link?
LinkTemplate:
myDiagram.linkTemplatemap1 =
$(go.Link,
{
curviness: 20,
layerName: "Background",
//routing: go.Link.AvoidsNodes,
routing: go.Link.Orthogonal,
corner: 10,
// mouse-overs subtly highlight links:
mouseEnter: (e, link) => link.findObject("HIGHLIGHT").stroke = "rgba(92, 8, 51, 0.26)",
mouseLeave: (e, link) => link.findObject("HIGHLIGHT").stroke = "transparent",
selectionAdorned: true,
margin: 20
},
$(go.Shape,
{
isPanelMain: true, strokeWidth: 8, stroke: "transparent",
name: "HIGHLIGHT",
margin: 20
}
),
$(go.Shape,
{
isPanelMain: true, stroke: "black", strokeWidth: 1.5, margin: 10,
}
),
$(go.Shape, // the arrowhead
{ toArrow: "standard", strokeWidth: 0, margin: 20 }
),
$(go.Panel, "Auto", //Link Lable Start
{
name: "LABEL",
segmentIndex: 2, segmentFraction: 0.5
},
new go.Binding("visible", "visible").makeTwoWay(),
$(go.Shape, "RoundedRectangle",
{
fill: "#F8F8F8", strokeWidth: 8, visible: false, alignment: go.Spot.Left,
}),
$(go.TextBlock, // the label
{
segmentIndex: 1, segmentFraction: 0.5,
height: 14,
textAlign: "center",
font: "bold 10pt serif",
stroke: "#F8F8F8",
editable: true,
margin: 2,
//segmentIndex: 0, segmentFraction: 0.2
},
new go.Binding("background", "text", CallBrushConverter1),
new go.Binding("text").makeTwoWay()
)
)
);