Hi, when I doublie click on the connector I want its information like connecterid, its old annotation and new annotation. Similarly if a node is double click for updating its annotations I want its respective properties but I am getting commonly as below, I want to check if the annotation of connector is being changing or node;'splease help!textEdit(args: ITextEditEventArgs) {console.log(args)//get a new text and old textconsole.log(args.newValue);console.log(args.oldValue);}
|
how to distinguish whether a node is getting edited or a connector, |
If the annotation in node gets edited means then you get the node through element args
If the annotation in connector gets edited means you can get connector through element args
Code example:
textEdit(args: ITextEditEventArgs) {
// gets node when it gets edited
console.log(args.element);
}
Simultaneously we cannot able to edit both node and connector annotation. So that we have handle in element args to return which object gets edited.
|
|
how to get the id of the respected element which is being edited. |
By using element args you can get the id of the respected element which gets edited.
Code example:
textEdit(args: ITextEditEventArgs) {
// gets element id which gets edited
console.log(args.element.id);
}
|