Skip to main content

nodePadding

How many pixels of padding are added around nodes (and avoidAreas) when building the pathfinding grid.

Typenumber
Default10
Minimum2

Higher values keep edges farther from node borders. Lower values allow tighter routing but may graze node corners.

createSmartEdge("bezier", { nodePadding: 20 });

Works together with gridRatio: padding is applied in graph pixels before the grid is built.