Hi PokCG,
Please use node’s addInfo property to add an custom information for an node. please refer to the code example in which we have shown how to define custom property for an node and bind the custom value in property editor.
Code example:
BasicShape node = new BasicShape();
node.Name = "node";
//define addInfo property
Dictionary<string, object> addInfo = new Dictionary<string, object>();
addInfo.Add("id", 1);
node.AddInfo = addInfo;
cshtml file
<div style="margin-top:10px;margin-left:8px">
<input type="text" id="textbox1" value="" style="width:100px" />
<label for="customproperty" style="font-size: 11px; margin-left: 4px">Custom</label>
</div>
Screenshot of cshtml file:
Methods.js file
SelectorVMClass.prototype.EnableNodeProperties = function (item, isEnable, isMultipleSelection) {
. . . . . .
. . . . . .
$("#textbox1").val(item.addInfo.id);
}
Output screenshot:
Regards,
Shyam G