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;
    doNotWriteBlankNewValues?: boolean;
    emptyTemplate?: string;
    filter?: ((b) => boolean);
    multipleSelections?: boolean;
    surface: Surface;
    templateResolver: ((obj) => string);
}

Hierarchy

  • Omit<InspectorOptions, "renderEmptyContainer" | "refresh">
    • VanillaInspectorOptions

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.

doNotWriteBlankNewValues?: boolean

Defaults to true. With this setting, if an update is made that has one or more blank strings, the strings will only be written to objects that already had some value for the corresponding key. If some object has, say, no value stored against the key foo, then the inspector will not write a value of "" for that key into the vertex. The reasoning for this flag is that you cannot get a null value from a text field, so if some text field has no value written in it and then gets a blur event, the UI reports a value of "", ie an empty string. But this is likely not the user's intention, if the field was blank to begin with.

emptyTemplate?: string

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

filter?: ((b) => boolean)

Optional filter you can use to instruct the inspector to ignore certain items.

Type declaration

    • (b): boolean
    • Parameters

      • b: Base

        The object to test

      Returns boolean

multipleSelections?: boolean

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

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

Version :