Interface DrawingToolsPluginOptions

Options for the drawing tools plugin

interface DrawingToolsPluginOptions {
    bordersVisible?: boolean;
    constrainGroups?: boolean;
    heightAttribute?: string;
    ignoreGrid?: boolean;
    leftAttribute?: string;
    minimumHeight?: number;
    minimumWidth?: number;
    onDemand?: boolean;
    onEdit?: ((o: Node | Group, surface: Surface, toolkit: JsPlumbToolkit) => any);
    payloadGenerator?: ((v: Node, p: ObjectData) => ObjectData);
    resizeMethod?: DrawingToolsResizeMethod;
    topAttribute?: string;
    widthAttribute?: string;
}

Hierarchy (view full)

Properties

bordersVisible?: boolean

When resizeMethod is "borders", set this to make the borders visible. Internally this just sets a CSS class on the draw skeleton's parent DOM element, and the appearance of the borders is then controlled via CSS.

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?: ((o: Node | Group, surface: Surface, toolkit: JsPlumbToolkit) => any)

Optional callback invoked after an edit has occurred

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

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

resizeMethod?: DrawingToolsResizeMethod

Method to use for resize - handles on the corners, or borders. Defaults to handles.

topAttribute?: string

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

widthAttribute?: string

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

Version :