Import it from @grafloria/engine.
Base options for all layout adapters
tsinterface LayoutOptions
Properties
| Name | Type | Default | Description |
|---|---|---|---|
seed? | number | Seed for any algorithm that uses randomness (force, spectral, community). | |
animate? | boolean | Whether to animate to new positions | |
animationDuration? | number | Animation duration in milliseconds | |
fit? | boolean | Whether to fit viewport to content after layout | |
padding? | number | Padding around content when fitting | |
constraints? | LayoutConstraints | Layout constraints for pinning/fixing nodes | |
calculateQuality? | boolean | Whether to calculate quality metrics after layout | |
canvasDimensions? | { width: number; height: number } | Canvas dimensions for quality assessment | |
portAware? | PortAwareLayoutOptions | Port-aware layout options | |
subgraph? | SubgraphLayoutOptions | Subgraph/group layout options | |
edgeBundling? | EdgeBundlingOptions | Edge bundling options | |
portConstraints? | PortConstraintMode | How much freedom the layout engine has over declared ports. 'auto' (default): FIXED_SIDE for nodes with author-declared ports, FREE for the rest. So an edge leaving a right port will not force the layout to put the target on the left. | |
labelAware? | boolean | Reserve space for edge labels at LAYOUT time (default true). | |
orthogonalRouting? | boolean | Ask the layout engine for orthogonal edge routes (default true for ELK). |
Was this page helpful?