tisoap / react-flow-smart-edge

Custom Edge for React Flow that never intersects with other nodes
https://tisoap.github.io/react-flow-smart-edge/
MIT License
256 stars 35 forks source link

Add helper function for EdgeTypes and Options #58

Open fsuk opened 11 months ago

fsuk commented 11 months ago

Is your feature request related to a problem? Please describe.

Currently introducing an option (such as gridRatio) is appears to be quite burdensome requiring the creation of a whole custom SmartEdge

Would it be possible to introduce a helper function to apply options to edge types?

Describe the solution you'd like

const edgeTypes :EdgeTypes = {
  smartstep: getSmartStepEdgeType(options)
}

...

return (
      <ReactFlow edgeTypes={edgeTypes} ... />

Describe alternatives you've considered

Creating a custom smart edge.

Additional context

No response