Skip to main content

InspectorComponent

Base inspector component. You can extend this class and just use the currentObj and/or currentType members in your template for a simple setup, or your subclass can manage its own more complicated state. This class will invoke reset() when there is no selected object, and refresh when an object is selected.

Type Parameters

T

T extends Base = Base

Methods

afterUpdate()

afterUpdate(ui): void

Invoked after an inspector update. You can override this method to update your UI if you need to.

Parameters

ui

BrowserUI

The UI that this inspector is attached to.

Returns

void


refresh()

refresh(obj): void

The base implementation of this method sets the current object type from objectType, and it also sets the current type to be the type of obj. You can override this method to implement more sophisticated scenarios.

Parameters

obj

Base

New object in inspector

Returns

void


reset()

reset(): void

The base implementation of this method sets the current type to be an empty string. You can override this method to implement more sophisticated scenarios.

Returns

void

Properties

context?

optional context: Record<string, any> = {}

Optional context for shared data for inspector templates.

Input


cssClass?

optional cssClass: string

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

Input


currentObj

currentObj: T

The object that is currently being inspected.

Class Member


currentObjectType

currentObjectType: string = ""

The objectType of the current object - Group, Node, Edge or Port

Class Member


currentType

currentType: string = ""

By default, this is the type of the current object. You can override refresh to implement more sophisticated scenarios.

Class Member


EDGE

EDGE: string = Edge.objectType

Edge.objectType is exposed on the class for reference in the template.

Class Member


GROUP

GROUP: string = Group.objectType

Group.objectType is exposed on the class for reference in the template.

Class Member


NODE

NODE: string = Node.objectType

Node.objectType is exposed on the class for reference in the template.

Class Member


PORT

PORT: string = Port.objectType

Port.objectType is exposed on the class for reference in the template.

Class Member


showCloseButton?

optional showCloseButton: boolean

Whether or not to show a close button. Defaults to false.

Input