react-diagrams: Crash when using smart routing
Hey!
I’ve got this error when using smart routing:
Uncaught TypeError: Cannot set property 'g' of undefined
at JPFNeverMoveDiagonally.JumpPointFinderBase.findPath (:1338/.temp/localDevUMD/nodeEditor/babylon.nodeEditor.js:61210)
at PathFinding.calculateDirectPath (:1338/.temp/localDevUMD/nodeEditor/babylon.nodeEditor.js:61210)
at DefaultLinkWidget.render (:1338/.temp/localDevUMD/nodeEditor/babylon.nodeEditor.js:61210)
at finishClassComponent (:1338/.temp/localDevUMD/nodeEditor/babylon.nodeEditor.js:52291)
at updateClassComponent (:1338/.temp/localDevUMD/nodeEditor/babylon.nodeEditor.js:52254)
at beginWork (:1338/.temp/localDevUMD/nodeEditor/babylon.nodeEditor.js:53072)
at performUnitOfWork (:1338/.temp/localDevUMD/nodeEditor/babylon.nodeEditor.js:55810)
at workLoop (:1338/.temp/localDevUMD/nodeEditor/babylon.nodeEditor.js:55850)
at renderRoot (:1338/.temp/localDevUMD/nodeEditor/babylon.nodeEditor.js:55936)
at performWorkOnRoot (:1338/.temp/localDevUMD/nodeEditor/babylon.nodeEditor.js:56827)
If I turn smart routing off, it works flawlessly
Here is our setup (with smart routing off): https://github.com/BabylonJS/Babylon.js/blob/master/nodeEditor/src/graphEditor.tsx#L528
Thanks a lot!
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 27 (12 by maintainers)
Man we love your library:)
New fixes rolling out soon:

You can specify the alignment of a port (top, left, bottom, right etc…)
update from my side:
componentShouldUpdate
improvements, the large performance demo goes down from 140ms rendering times to 3 to 10 ms rendering times.recalculatePortCoords
(method is removed)@memsenpai same for me. By the way, I am Vietnamese =))
Wonderful! Still blocked on the other issue though
Ok so more questions 😃
Everything compiles but this one now: https://github.com/BabylonJS/Babylon.js/blob/projectstorm/nodeEditor/src/graphEditor.tsx#L289
When executing, I’ve got this weird error: https://github.com/BabylonJS/Babylon.js/blob/projectstorm/nodeEditor/src/components/diagram/generic/genericNodeFactory.tsx#L14
if you check out the lerna branch, run
yarn
in the root and then head to thelib-demo-gallery
you can runyarn start
and then you should get the new demos. Ive been giving this some thought, and I wouldn’t mind getting involved in upgrading your current implementation in Babylone.js when this releasesWhat should I do to switch to the new project? (using 5.2.1 for now) Your tool will be a central piece of our 4.1 release as it will fuel our Node Material system 😃
So glad we can work together