question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onNodePositionChange is not called every time

See original GitHub issue

Describe the bug I’ve seen this problem discussed here: https://github.com/danielcaldas/react-d3-graph/issues/264 and it seems like the bug was closed, but I’m still experiencing the same issue.

To Reproduce I cannot pinpoint what the problem is. It just seems to randomly work/not work regardless of what I’m doing. Sometimes it doesn’t trigger even when I move a node halfway across the screen, but then it does trigger if I move it again just a tiny bit.

Expected behavior The onNodePositionChange callback should be triggered every time a node is moved.

Screenshots image The console.log statement is triggered every time a node is moved. In my case, I moved the Employee Lounge - more dialogue node two times, but the console.log statement was triggered only once.

Environment:

  • OS: Ubuntu 18.04
  • Browser Chrome
  • Version 80
  • Node version 10.12.0
  • react-d3-graph version 2.4.0
  • d3 version 5.15.0
  • react version 16.8.6

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
NoMercy235commented, Mar 29, 2020

Yup, everything works correctly now! The links follow the custom type property and I’ve tested the onNodePositionChange callback for a few minutes and it was called every time. Thank you for the release! 😃 I will close this ticket and the other one.

1reaction
danielcaldascommented, Mar 29, 2020

Indeed lib seems not to be up to date 🤔 I’m working on releasing a patch version 2.4.1 that hopefully should fix this. Thanks for catching this one @NoMercy235 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-d3-graph 2.6.0 | Documentation
React component to build interactive and configurable graphs with d3 effortlessly.
Read more >
onLocationChanged is not called automatically - Stack Overflow
So, onLocationChanged is called only once and only after I press "start". It's supposed to be called automatically every time the location has ......
Read more >
react-d3-graph: Versions - Openbase
Some properties make the graph becomes unresetable #372; Node does not move/update ... Adding missing onNodePositionChange property in Graph.jsx doc #405 ...
Read more >
Troubleshooting Guide - React Flow
Warning: Seems like you have not used zustand provider as an ancestor​ ... which will cause React Flow to re-render every time your...
Read more >
API Documentation — Neo4j Python Driver 5.2
The maximum amount of time in seconds to wait for a TCP connection to be established. This does not include any handshake(s), or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found