I have a graph in which I'm toggling the visible state of cells. When doing so, I hit an error in isValidAncestor(cell, parent, recurse = false) during graph layout where the cell argument is null.
Tracing the stack and debugging, I see the following call flow from the layout:
graph.getConnections(cell, parent) -> graph.getEdges(cell, parent, true, true, false) -> isValidAncestor(cell, parent, recurse = false)
And the isValidAncestor method is called because:
- The edge is an outgoing edge
- The call to getView().getState(edge) returns null
- Because of 2, the target variable is set by a call to this.getView().getVisibleTerminal(edges[i], false) which also returns null because the target of the edge has been set to not be visible
I've tried to reproduce this with a simple test case, but I can't reproduce 2 above. In my simple test case, the state is available for the cell and thus the target of the edge is in the cached state
I have a graph in which I'm toggling the visible state of cells. When doing so, I hit an error in isValidAncestor(cell, parent, recurse = false) during graph layout where the cell argument is null.
Tracing the stack and debugging, I see the following call flow from the layout:
graph.getConnections(cell, parent) -> graph.getEdges(cell, parent, true, true, false) -> isValidAncestor(cell, parent, recurse = false)And the isValidAncestor method is called because:
I've tried to reproduce this with a simple test case, but I can't reproduce 2 above. In my simple test case, the state is available for the cell and thus the target of the edge is in the cached state