Interface MiniviewPluginOptions

Options for the miniview plugin.

interface MiniviewPluginOptions {
    activeTracking?: boolean;
    clickToCenter?: boolean;
    collapsible?: boolean;
    container: BrowserElement;
    elementFilter?: ((v) => boolean);
    enableWheelZoom?: boolean;
    suspended?: boolean;
    typeFunction?: ((v) => string);
    visible?: boolean;
    wheelReverse?: boolean;
    wheelSensitivity?: number;
}

Hierarchy (view full)

Properties

activeTracking?: boolean

Defaults to true, meaning the miniview actively updates as nodes/groups are dragged on the related surface. If this is set to false, the miniview only updates after mouseup.

clickToCenter?: boolean

Defaults to true, meaning a click on a node/group in the miniview will cause that node/group to be centered in the related surface.

collapsible?: boolean

Defaults to true, determines whether or not the miniview can be collapsed.

container: BrowserElement

Element to render into. When using a library integration you do not provide this.

elementFilter?: ((v) => boolean)

Optional filter for elements to display. Defaults to undefined - all elements displayed.

Type declaration

    • (v): boolean
    • Parameters

      • v: Vertex

      Returns boolean

enableWheelZoom?: boolean

Defauts to true, Whether or not to enable the wheel zoom.

suspended?: boolean

Defaults to false. Whether or not to suspend rendering after load.

typeFunction?: ((v) => string)

Optional function to use to derive a type for each rendered node/group. This is written onto the corresponding element as the value of the data-jtk-miniview-type attribute, and can be useful for styling.

Type declaration

    • (v): string
    • Parameters

      • v: Node | Group

      Returns string

visible?: boolean

Defaults to true. Whether or not the miniview is initially visible.

wheelReverse?: boolean

Defaults to false. Whether or not to reverse the zoom direction in response to a wheel event.

wheelSensitivity?: number

Optional overide for how sensitive the wheel zoom should be.