Class: DisplayPaneViewFactory
Creates display pane views.
Constructors
constructor
• new DisplayPaneViewFactory(): DisplayPaneViewFactory
Returns
Methods
createViewNode
▸ createViewNode(key
, index
): VNode
Creates a new display pane view instance as a VNode.
Parameters
Name | Type | Description |
---|---|---|
key | string | The key of the display pane view to create. |
index | DisplayPaneIndex | The 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
Name | Type | Description |
---|---|---|
key | string | The key of the display pane view to register. |
vnodeFn | (index : DisplayPaneIndex ) => VNode | A 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