How to get the linker selected along with the label in gojs

Capture4
In the screenshot I selected the linker…I want the “label” to be selected along with the linker…Because when a linker is selected and if there is a label then I should change the “font” etc…Please help me to get the label selected along with the linker…Pasting the code below:

private getLinkTemplateMap(): go.Map<string, go.Link> {
//------------------------------------------ Link Templates ----------------------------------------------
const segOffset = -10;
this.linkTemplateMap = this.bpmnService.getLinkTemplateMap();
const sequenceLinkTemplate =
go.GraphObject.make(go.Link,
{
contextMenu:
go.GraphObject.make(go.Adornment, ‘Vertical’,
go.GraphObject.make(‘ContextMenuButton’,
go.GraphObject.make(go.TextBlock, ‘Default Flow’),
// in the click event handler, the obj.part is the Adornment; its adornedObject is the port
{
click: (e, obj) => {
this.setSequenceLinkDefaultFlow(obj.part.adornedObject);
}
}),
go.GraphObject.make(‘ContextMenuButton’,
go.GraphObject.make(go.TextBlock, ‘Conditional Flow’),
// in the click event handler, the obj.part is the Adornment; its adornedObject is the port
{
click: (e, obj) => {
this.setSequenceLinkConditionalFlow(obj.part.adornedObject);
}
})
),
routing: go.Link.Orthogonal,
curve: go.Link.JumpOver,
corner: 5, toShortLength: 4,
relinkableFrom: true,
fromSpot: go.Spot.Default,
relinkableTo: true,
reshapable: true,
resegmentable: true
},
new go.Binding(‘points’).makeTwoWay(),
go.GraphObject.make(go.Shape, { stroke: ‘black’, strokeWidth: 1 }),
go.GraphObject.make(go.Shape, { toArrow: ‘Triangle’, scale: 1.2, fill: ‘black’, stroke: null }),
go.GraphObject.make(go.Shape, { fromArrow: ‘’, scale: 1.5, stroke: ‘black’, fill: ‘white’ },
new go.Binding(‘fromArrow’, ‘isDefault’, (s: object) => {
if (s === null) return ‘’;
return s ? ‘BackSlash’ : ‘StretchedDiamond’;
}),
new go.Binding(‘segmentOffset’, ‘isDefault’, (s: boolean) => {
const paramX = 5;
return s ? new go.Point(paramX, 0) : new go.Point(0, 0);
})),
go.GraphObject.make(go.TextBlock, { // this is a Link label
name: ‘Label’, editable: true, text: ‘label’,
segmentOffset: new go.Point(segOffset, segOffset), visible: false
},
new go.Binding(‘text’, ‘text’).makeTwoWay(),
new go.Binding(‘visible’, ‘visible’).makeTwoWay())
);

this.linkTemplateMap.add('', sequenceLinkTemplate);
return this.linkTemplateMap;

}

I am unable to read your code – please format it nicely and surround the code with lines of triple backquote. Code Formatting

The basic answer to your question is at GoJS Selection -- Northwoods Software