Here, i had used textBlock for assigning the label between two nodes and it is working fine in version v2.1.22 but now i have upgrade my version to 2.3.11 can you please suggest me changes.
$(go.TextBlock, "Label", {
width: 60,
height: 16,
name: "linkLabel",
margin: go.Margin.parse("4 15 0 9"), editable: true,
maxLines: 1,
textAlign: "center",
isMultiline: true, // don't allow embedded newlines
//textValidation: validateText,
textEdited: function (textBlock, previousText, currentText) {
var condition = true;
$rootScope.EdgepreviousText = previousText;
getAllConnectedLinksOfSelectedNode = myDiagram.findNodeForKey(myDiagram.selection.first().data.from).findLinksConnected();
var count = validateLinkName(getAllConnectedLinksOfSelectedNode, currentText);
if (count > 1) {
MbtDiagramInstance.setSelectedNodeProperty('text', previousText);
ServiceFactory.notifier($scope, 'Multiple edges with same name cannot start from same vertex', 'Error');
return false;
}
if (previousText == currentText) {
condition = false;
}
if (condition) {
var selectedData = myDiagram.selection.first().data;
if (selectedData.hasOwnProperty('EdgeID')) {
var edgeName = currentText.split('\u00AD');
if (edgeName.length > 1) {
edgeName = currentText.split('\u00AD')[1].trim();
} else {
edgeName = currentText;
//edgeName = currentText.trim();
}
if (currentText.trim() == "") {
saveButtonEnable = false;
ServiceFactory.notifier($scope, 'vertex/edges name can not be blank', 'Error');
MbtDiagramInstance.setSelectedNodeProperty('text', previousText);
} else {
$scope.MBTOperationScope.renameEdge(edgeName);
}
}
} else {
saveButtonEnable = false;
}
}
},
new go.Binding('visible', 'text', function (t) {
return t.trim() !== ''
}),
new go.Binding("text", "text", function (e) {
if (e != "") {
return e;
}
}).makeTwoWay(),
{
toolTip:
$("ToolTip",
new go.Binding("visible", "text", function (t) {
if (t.trim('') == "Associated FL Name :") {
t = '';
}
return !!t;
}).ofObject("TB"),
$(go.TextBlock,
{ name: "TB", margin: 4, font: "bold 12px Verdana,serif", stroke: "black" },
new go.Binding("text", "", diagramNodeInfo))
)
}
),
this is my expected output
and this is what i get