Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Add node data asynchronous

$
0
0

@BFENico wrote:

Hello,

i have a problem when i add node data asynchronous. See the video...

https://cloud.bfe.tv/index.php/s/3DIWYUQ3kWGLe1R

When i refresh the site then i have no problem.

I use Angular 2 Component with RxJs.

this.subscription = this.service.nodes$.subscribe(arrData => {
let isTA = false;
arrData.forEach(d => {
var data = MyDiagram.diagram.model.findNodeDataForKey(d.name);
if (data === null) {
if (isTA === false) {
MyDiagram.diagram.model.startTransaction('add');
isTA = true;
}
MyDiagram.diagram.model.addNodeData(d);
}
})
if (isTA) {
MyDiagram.diagram.model.commitTransaction('add');
}

Thank you for help

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles