react-diagrams
react-diagrams copied to clipboard
"Cannot read property 'x' of undefined" error when use smart-routing
I'm using v6.2.0 and in the process of making some kind of DB schema diagram that users can view, edit, add/modify/delete tables/columns etc. Here is how it looks like:
Currently I have a strange issue after I started to use smart-routing for links. Time to time I receive Cannot read property 'x' of undefined
error (on screenshot below), sometimes right after render, and sometimes when trying to drag some node. No strong steps to reproduce this behavior (tried to find out it, but no luck). And sometimes I see another error Cannot read property '26' of undefined
(or any other number) caused at pathfinding/src/core/Grid.js.Grid.getNodeAt (Grid.js:84)
.
I saw issues with similar problem, but any solution seems can't help me.
https://github.com/projectstorm/react-diagrams/issues/433
Here suggestion is to add engine.recalculatePortsVisually()
, but there is no such method in current version of library.
Also it does not related to dropping nodes from sidebar.
https://github.com/projectstorm/react-diagrams/issues/214
Any update on this issue? I am getting same issue when rendering a PathFindingLink or dragging it.. the moment the link is near or crosses the canvas, it blows up, giving same errors like above.
PS: I am not using smart-routing.
I also need a solution to the issue. The same error occurs. The case cannot be reproduced because the error occurs very irregularly. It occurs while moving nodes while the link is connected.
No errors occur when smart routing is not used (when using DefaultLinkModel
).
The version I use is v6.6.1.
Hi, Is there any updates on this issue ? I succeed to use smart routing but then i realized that when I move any node to out of the canvas, i got the same error. Then I looked at the react diagrams demo, i moved a node as the same i did on my screen, i got the same error!
We also struggle with this issue and need support. Is there any plan for this bug or workaround at the moment ?