Skip to content

@graphty/graphty-element / index / ExpandBehavior

Interface: ExpandBehavior ​

Defined in: graphty-element/src/session/sources/types.ts:58

What a click or double-click on a node fetches, in the element's behavior.expand config. Every default is neutral: nothing expands until trigger is set. Experimental.

Properties ​

depth? ​

readonly optional depth?: number

Defined in: graphty-element/src/session/sources/types.ts:62

How many hops.

Default Value ​

ts
1

direction? ​

readonly optional direction?: "out" | "in" | "both"

Defined in: graphty-element/src/session/sources/types.ts:64

Which edges to follow.

Default Value ​

ts
"both"

layout? ​

readonly optional layout?: "none" | "continue"

Defined in: graphty-element/src/session/sources/types.ts:70

"continue" feeds new nodes to the running layout; "none" leaves them where they start.

Default Value ​

ts
"continue"

limit? ​

readonly optional limit?: number

Defined in: graphty-element/src/session/sources/types.ts:66

At most this many new nodes per expansion; no limit by default.


relationshipTypes? ​

readonly optional relationshipTypes?: readonly string[]

Defined in: graphty-element/src/session/sources/types.ts:68

Only these relationship types.


trigger? ​

readonly optional trigger?: "none" | "click" | "double-click"

Defined in: graphty-element/src/session/sources/types.ts:60

What expands a node.

Default Value ​

ts
"none"