Hi,
I am adding a label to a link programmatically, which then displays on the diagram correctly.
When I persist the model, the link label does not appear in the JSON.
Please advise, thanks,
Ian.
function linkDoubleClick(e, obj) {
var nodeIndex = obj.data.from;
currentLink = obj;
var node = diagram.findNodeForKey(nodeIndex);
if (node.data.item == "Conditional") {
jQuery('#conditionalSelectModal').modal('show');
var index;
for (index = 0; index < node.data.Conditions.length; index++) {
jQuery('#ddlCondSelect').append(jQuery('<option>', {
value: node.data.Conditions[index].ConditionName,
text: node.data.Conditions[index].ConditionName
}));
}
}
}
jQuery('#conditionalSelectModal').on('hide.bs.modal', function (e) {
var textblock = new go.TextBlock();
textblock.text = jQuery('#ddlCondSelect').val();
textblock.margin = 5;
currentLink.add(textblock);
});