On deleting Node Canvas Data is not visible

Hi
When I am deleting a node from one canvas then other canvas data is not visible.But it is present in nodedata Array.
Please give solution fast.

It sounds as if you are sharing the Model.nodeDataArray between two Models. Is that the case, and if so why? And in that case why are you not sharing Models, rather than sharing just the Arrays of node data?

Actually problem is that when I am deleting output data array from one canvas than data that is visible before deleting that also not showing on canvas.
But is is present in that array when i am checking through console.log.

I’m sorry, but I do not understand the situation that you are describing.

Hi Walter,

The scenario is like this:-
I am connecting the nodes like this

Two nodes are connected to join node.Three nodes are in canvas 1.
On clicking on join node.One modal open and there is another canvas named as Canvas2.

You can see there is group and named as selected Column .
But after closing this modal when I am resized one node like this->


Now after resizing of node When I am again clicking on modal then selected column group is not visible on canvas 2.

The data is present in nodedataArray but it is not visible on canvas 2.

You can see data “selected Column” is present there but it is not visible on canvas.
So after resizing what happened so that selected column is became invisible ???

If you evaluate in that modal diagram:

    diagram.findNodeForKey(-2).location.toString()

What result do you get? Also, what are:

    diagram.findNodeForKey(-2).isVisible()
    diagram.viewportBounds
    diagram.documentBounds
```

diagram.findNodeForKey(-2).location.toString()
Answer=“Point(NaN,NaN)”
diagram.findNodeForKey(-2).isVisible()
Answer=true
diagram.documentBounds
A {x: -5, y: -5, width: 10, height: 10, D: true}

ya when we got (NaN,NaN) it means node is not available.But What we will do to again reloading that node

Actually I have one more problem.
Selected column is visible in model and its location created automatically.
So when i am checking diagram.findNodeForKey(-2).location.toString() on console.log then it gives exact position.
But when I am checking though code then position is always NaN.

Then you are dealing with two different Diagrams, which is causing the confusion that you have. Upon showing the second time, is the Diagram supposed to be the same as before or is it supposed to be a new one? You need to figure out what it should be and debug why the actual behavior is different.

That Diagram.documentBounds indicates that that diagram has nothing showing in it. The 10x10 size is entirely due to the Diagram.padding.

Thanks problem resolved now!!