smartEdgePresets
Canonical drawEdge, generatePath, and fallback configs for each preset. Spread into getSmartEdge options or SmartEdge's options prop.
import { getSmartEdge, smartEdgePresets } from "@tisoap/react-flow-smart-edge";
// Same as SmartBezierEdge
getSmartEdge({ /* ... */, options: smartEdgePresets.bezier });
// Same as SmartStepEdge
getSmartEdge({ /* ... */, options: smartEdgePresets.step });
// Same as SmartStraightEdge
getSmartEdge({ /* ... */, options: smartEdgePresets.straight });
Preset keys
bezier—svgDrawSmoothLinePath+pathfindingAStarDiagonalstraight—svgDrawStraightLinePath+pathfindingAStarDiagonalstep—svgDrawStraightLinePath+pathfindingJumpPointNoDiagonalsmoothstep— smooth-step draw + jump-point pathfinding
Override individual fields when spreading:
options: { ...smartEdgePresets.step, gridRatio: 5 }