Skip to content

@graphty/graphty-element / index / defineLayout

Function: defineLayout() ​

defineLayout<O>(definition, options?): void

Defined in: graphty-element/src/simple/defineLayout.ts:500

Register a layout from a plain definition object.

Type Parameters ​

O ​

O extends Readonly<Record<string, OptionShorthand>> = NoOptions

Parameters ​

definition ​

LayoutDefinition<O>

The id, the options in short form, and place.

options? ​

RegisterOptions

How to register it; strict refuses replacing a different layout under the id.

Returns ​

void

Throws ​

A GraphtyError E_BAD_COMMAND for a malformed definition, before anything is registered.