Interface DrawingToolsPluginOptions

Options for the drawing tools plugin

interface DrawingToolsPluginOptions {
    constrainGroups?: boolean;
    heightAttribute?: string;
    ignoreGrid?: boolean;
    leftAttribute?: string;
    minimumHeight?: number;
    minimumWidth?: number;
    onDemand?: boolean;
    onEdit?: (() => any);
    payloadGenerator?: ((v, p) => ObjectData);
    topAttribute?: string;
    widthAttribute?: string;
}

Hierarchy (view full)

Properties

constrainGroups?: boolean

Defaults to true, meaning groups will not be shrunk to the point that one or more of their child vertices is no longer visible.

heightAttribute?: string

Attribute to use for vertex height - defaults to 'height'

ignoreGrid?: boolean

Defaults to false, meaning size changes conform to an underlying grid, if present

leftAttribute?: string

Attribute to use for vertex left position - defaults to 'left'

minimumHeight?: number

Minimum height the user can shrink a vertex to. Defaults to 30.

minimumWidth?: number

Minimum width the user can shrink a vertex to. Defaults to 30.

onDemand?: boolean

Defaults to false, meaning the drawing tool plugin switches on whenever a new vertex is selected.

onEdit?: (() => any)

Optional callback invoked after an edit has occurred

Type declaration

    • (): any
    • Returns any

payloadGenerator?: ((v, p) => ObjectData)

Optional helper method you can supply which will augment the changes being made by an update in the drawing tools.

Type declaration

    • (v, p): ObjectData
    • Parameters

      • v: Node
      • p: ObjectData

      Returns ObjectData

topAttribute?: string

Attribute to use for vertex top position - defaults to 'top'

widthAttribute?: string

Attribute to use for vertex width - defaults to 'width'