reaviz / reaflow

🎯 React library for building workflow editors, flow charts and diagrams. Maintained by @goodcodeus.
https://reaflow.dev
Apache License 2.0
2.11k stars 122 forks source link

useProximity throws error on getCoords #198

Open jweinstein92 opened 1 year ago

jweinstein92 commented 1 year ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Current behavior

When using useProximity when a node is dragged, a console error is thrown

Expected behavior

There should be no error thrown when dragging a node

Minimal reproduction of the problem with instructions

The getCoords definition expects the call to include a layoutXY property like in useNodeDrag

What is the motivation / use case for changing the behavior?

Correct usage of the getCoords function

Environment


Libs:
- react version: 18.2.0
- reaflow version: 5.1.1


Browser:
- [x] Chrome (desktop) version 108.0.5359.124
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:
- Node version: XX  
- Platform:  

Others: