Class: DisplayPaneViewFactory
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneViewFactory.ts:8
Creates display pane views.
Constructors
Constructor
new DisplayPaneViewFactory():
DisplayPaneViewFactory
Returns
DisplayPaneViewFactory
Methods
createViewNode()
createViewNode(
key
,index
):VNode
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneViewFactory.ts:29
Creates a new display pane view instance as a VNode.
Parameters
Parameter | 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.
registerView()
registerView(
key
,vnodeFn
):void
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneViewFactory.ts:18
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
Parameter | Type | Description |
---|---|---|
key | string | The key of the display pane view to register. |
vnodeFn | (index ) => VNode | A function which creates new instances of the display pane view to register as VNodes. |
Returns
void