日本語
@eightkk/vue-weave / vue-weave / useAsyncGraphLayout
Function: useAsyncGraphLayout()
useAsyncGraphLayout<
N,E,G>(options):AsyncGraphLayout<N,E,G>
Defined in: src/composables/useAsyncGraphLayout.ts:152
Asynchronous layouts for NetworkGraph. The input is turned into layout requests as NetworkGraph would lay it out (buildGraphLayoutRequests), the adapter computes them, and display changes only when every layout of one input is ready (both scopes while a group is collapsed), so the nodes, edges, collapse state and layouts passed to the graph always belong together. Results of older or cancelled requests are never shown; a failure keeps the last display. Requests start when the owning component mounts (immediately outside a component), so nothing is started during server rendering. Use the graph's collapsedGroupIds prop with the frame's value: an uncontrolled collapse would ask for a layout that has not been computed.
Type Parameters
N
N extends NetworkNode<unknown>
E
E extends GraphEdge<unknown>
G
G extends NetworkGroup = NetworkGroup
Parameters
options
UseAsyncGraphLayoutOptions<N, E, G>
Returns
AsyncGraphLayout<N, E, G>