rete-auto-arrange-plugin
packageAuto arrange plugin. Layouts the graph using elk.js
tsclass AutoArrangePlugin<Schemes extends ExpectedSchemes, T extends unknown>
Parameter | Extends | Description |
---|---|---|
Schemes | ExpectedSchemes | |
T | unknown |
Extends Scope<never, BaseArea<Schemes> | T, Root<Schemes>>
Adds a preset to the plugin, which will be used to layout the node ports and customize the layout options
tsaddPreset(preset: Preset): void
Parameter | Type | Description |
---|---|---|
preset | Preset | Preset to add |
Returns void
Method to layout the graph
tslayout(props: { applier: Applier<Schemes, T>, options: LayoutOptions } & Partial<Context<Schemes>>): Promise<{ demonstration: string, result: ElkNode, source: string }>
Parameter | Type | Description |
---|---|---|
props | { applier: Applier<Schemes, T>, options: LayoutOptions } & Partial<Context<Schemes>> | Options for the layout |
Returns Promise<{ demonstration: string, result: ElkNode, source: string }>
Debug information about the layout
Standard applier. Applies the layout to the nodes and their children immediately
tsclass StandardApplier<S extends ExpectedSchemes, K extends unknown>
Parameter | Extends | Description |
---|---|---|
S | ExpectedSchemes | |
K | unknown |
Extended by TransitionApplier
Extends Applier<S, K>
appliers/list/transition/index.ts
Transition applier. Applies the layout to the nodes and their children with transition
tsclass TransitionApplier<S extends ExpectedSchemes, K extends unknown>
Parameter | Extends | Description |
---|---|---|
S | ExpectedSchemes | |
K | unknown |
Extends StandardApplier<S, K>
appliers/list/transition/index.ts
tsconstructor(props: TransitionApplierProps): TransitionApplier<S, K>
Parameter | Type | Description |
---|---|---|
props | TransitionApplierProps | Transition applier props |
Returns TransitionApplier<S, K>
appliers/list/transition/index.ts
Transition applier props
tstype TransitionApplierProps = { duration: number; needsLayout: Function; onTick: Function; timingFunction: Function; };
Built-in presets. Responsible for node port positioning.
Classic preset. Input ports are positioned on the left bottom side of the node, output ports are positioned on the right top side of the node.
tssetup(props: { bottom: number, spacing: number, top: number }): Preset
Parameter | Type | Description |
---|---|---|
props | { bottom: number, spacing: number, top: number } |
Returns Preset