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)

Most upvoted comments

Man we love your library:) image

New fixes rolling out soon: Screenshot 2019-07-27 at 16 11 52 Screenshot 2019-07-27 at 16 10 58 Screenshot 2019-07-27 at 16 10 05

You can specify the alignment of a port (top, left, bottom, right etc…)

update from my side:

  • thanks to lots of componentShouldUpdate improvements, the large performance demo goes down from 140ms rendering times to 3 to 10 ms rendering times.
  • you no longer need to call recalculatePortCoords (method is removed)
  • there is no longer a double render cycle on initial render, the links now efficiently track their target ports on initial renders and wait for them to report initial dimensions.

@memsenpai same for me. By the way, I am Vietnamese =))

Wonderful! Still blocked on the other issue though

if you check out the lerna branch, run yarn in the root and then head to the lib-demo-gallery you can run yarn 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 releases

What 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