public addDataSource() {
//add new node to datasource
this.diagram.dataSourceSettings.dataManager.dataSource.json.push( { 'Name': 'Consulting', 'Category': 'Business' }, { 'Name': 'HR', 'Category': 'Business' });
this.diagram.clear();
//refresh the diagram
this.diagram.refresh();
} |
Query |
Response | |
Would history work if I call?
//refresh the diagram
this.diagram.refresh();
|
The history will be cleared once the diagram is refreshed. | |
User adds new element by dragging node from symboll-pallete - this triggers few events from ejs diagram, what is the best event to listen to? What is the event, on which I want to call refresh? I tried your code and I got errors, because event which was triggered by dropping element did not finish before calling refresh. I tried listening on (drop), collection changing event (10), collection changed event (14). |
Code example:
The node highlighter is not removed once we drop a node onto the another node in diagram. We have logged a defect report. The patch for this issue will be available on 8th October, 2019. You can track the status of the bug in the below feedback link.
We have provided a workaround in the above sample to remove the highlighter. |