Skip to main content

Class: DisplayPaneViewFactory

Creates display pane views.

Constructors

constructor

new DisplayPaneViewFactory(): DisplayPaneViewFactory

Returns

DisplayPaneViewFactory

Methods

createViewNode

createViewNode(key, index): VNode

Creates a new display pane view instance as a VNode.

Parameters

NameTypeDescription
keystringThe key of the display pane view to create.
indexDisplayPaneIndexThe index of the view's parent pane.

Returns

VNode

A new display pane view instance as a VNode.

Throws

Error if no view is registered under the given key.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Components/DisplayPanes/DisplayPaneViewFactory.ts:29


registerView

registerView(key, vnodeFn): void

Registers a display pane view under a specific key. Once a view is registered, new instances can be created using the key under which it was registered via the createViewNode() method. Registering a view under an existing key will replace the old view registered under that key.

Parameters

NameTypeDescription
keystringThe key of the display pane view to register.
vnodeFn(index: DisplayPaneIndex) => VNodeA function which creates new instances of the display pane view to register as VNodes.

Returns

void

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Components/DisplayPanes/DisplayPaneViewFactory.ts:18