Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
151113 | Jan 31,2020 08:20 AM UTC | Mar 5,2020 10:39 AM UTC | Angular - EJ 2 | 5 |
![]() |
Tags: Diagram |
<ejs-diagram #diagram id="diagram" width="100%" height="700px (textEdit)="textEdit($event)" >
</ejs-diagram>
textEdit(args:ITextEditEventArgs) {
//get a new text and old text
console.log(args.newValue);
console.log(args.oldValue);
}
|
public selectionChange(args: ISelectionChangeEventArgs): void {
if(args.state == "Changing" && args.type == "Addition"){
// get id of selection node/connector
console.log(args.newValue[0].id);
}
} |
public selectionChange(args: ISelectionChangeEventArgs): void {
if(args.state == "Changing" && args.type == "Addition"){
// to find the selected object is a node
if(args.newValue[0] instanceof Node){
console.log('node');
}
// to find the selected object is a connector
if(args.newValue[0] instanceof Connector){
console.log('connector');
}
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.