Skip to Content

自动布局

此示例演示了如何自动排列节点。它引入了一个可重复使用的 useAutoLayout 钩子,并展示了三种可在运行时切换的常用布局引擎:dagre d3-hierarchy elk 

¥This example demonstrates how to automatically arrange nodes. It introduces a reusable useAutoLayout hook and showcases three popular layout engines that you can switch between at runtime: dagre , d3-hierarchy , and elk .

This is a Pro example. Get all pro examples, templates, 1:1 support from the xyflow team and prioritized Github issues with a React Flow Pro subscription.

关于此 Pro 示例

¥About this Pro Example

Last updated on