Interface VanillaInspectorOptions

Options for the VanillaInspector, an instance of Inspector that uses the Toolkit's default templating mechanism to render elements.

interface VanillaInspectorOptions {
    afterUpdate?: (() => any);
    autoCommit?: boolean;
    cacheTemplates?: boolean;
    container: HTMLElement;
    cssClass?: string;
    emptyTemplate?: string;
    multipleSelections?: boolean;
    refresh: ((obj, cb) => void);
    renderEmptyContainer: (() => void);
    surface: Surface;
    templateResolver: ((obj) => string);
}

Hierarchy (view full)

Properties

afterUpdate?: (() => any)

Optional callback to invoke after an update has occurred.

Type declaration

    • (): any
    • Returns any

autoCommit?: boolean

Whether or not to auto commit changes on blur/change events. Defaults to true.

cacheTemplates?: boolean

By default the inspector will cache found templates, keyed by the type of the object and its category (there is a separate cache for nodes, groups, edges and ports, and in each cache the key is the object's type). In some situations you may not want to cache the template, for instance if your template has dynamic data that depends on the object that is being inspected. If that's the case you can set this to false.

container: HTMLElement

The element in which the inspector is drawn.

cssClass?: string

Optional css class(es) to set on the inspector - a space separated list.

emptyTemplate?: string

Template to use in the inspector when there is nothing selected. By default an empty div element is used.

multipleSelections?: boolean

Whether or not to support multiple selections. Defaults to true.

refresh: ((obj, cb) => void)

Callback invoked when a new object has started to be edited.

Type declaration

    • (obj, cb): void
    • Parameters

      • obj: Base
      • cb: (() => any)
          • (): any
          • Returns any

      Returns void

renderEmptyContainer: (() => void)

Callback invoked when the inspector is cleared.

Type declaration

    • (): void
    • Returns void

surface: Surface

The surface to attach to.

templateResolver: ((obj) => string)

Resolves templates for a given object.

Type declaration

    • (obj): string
    • Parameters

      • obj: Base

      Returns string