-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow developers to change the path finding function #14
Comments
Hey @lichenglu thanks for pointing it out! When I choose I don't feel confident in forking/maintaining it, which leaves the option to find another up to date dependency |
That makes sense as I would expect it to be a mature enough problem with robust solutions. Do you have an alternative in mind? I have briefly looked around and it seems https://github.com/prettymuchbryce/easystarjs can be used to easily replace P.S. I would love to help revamp the use of path finding if you don't mind determining an alternative package |
Thinking on how to circumvent this without putting the burden on me to update/change the path finding dependency, I'm planning to create a factory function. Developers can "build" their own versions of a smart edge passing down configurations to this factory function, and I'll expose the option to change the default path finding function. |
Hey @lichenglu ! I've released a beta version that makes it possible to configure the path finding function using a Available to test using the
New documentation can be found here EDIT: Version 1.0 released with this feature |
First of all, thanks for the great package! It saves me tons of time.
Originally, the package did not seem to be "smart" on my end (still using the
BezierEdge
fromreact-flow
). I then found out that the length ofsmoothedPath
for me is always smaller or equal to 2, which fallbacks to the edges ofreact-flow
(see codes here). Then I was thinking it cannot be thatsmoothedPath
is always that case. It turns out there is a bug in the dependencypathfinding
, where no coordinate will be recorded if coming across a block (start and end coordinate will not be updated either).The fix is easy but it seems that no one is maintaining
pathfinding
anymore (e.g., qiao/PathFinding.js#192).Suggestions
react-flow-smart-edge
should use a fork ofpathfinding
to have known bugs fixed?The text was updated successfully, but these errors were encountered: