I'm trying to keep the corresponding database ID for each node in the object. The only way I've found to do this is to keep the ID in the cssClass:
diagram.updateLabel(element.name, element.labels[0], { text: activityDescription, cssClass: activityID });
And to access it later:
var id = element.labels[0].cssClass;
This works, but I would rather avoid any potential unwanted behaviour or confusion.
I have tried using { id: activityID } but it is undefined when I try element.labels[0].id;
Is there any property I can use apart from cssClass for this purpose?
Thanks