Class: BearingDisplay
Defined in: workingtitle-instruments-epic2/shared/Components/NumberDisplays/BearingDisplay.tsx:44
Displays a bearing value.
Extends
Constructors
Constructor
new BearingDisplay(
props):BearingDisplay
Defined in: sdk/components/FSComponent.ts:73
Creates an instance of a DisplayComponent.
Parameters
| Parameter | Type | Description |
|---|---|---|
props | BearingDisplayProps | The propertis of the component. |
Returns
BearingDisplay
Inherited from
AbstractNumberUnitDisplay.constructor
Properties
context?
optionalcontext: [] =undefined
Defined in: sdk/components/FSComponent.ts:64
The context on this component, if any.
Inherited from
AbstractNumberUnitDisplay.context
contextType?
readonlyoptionalcontextType: readonly [] =undefined
Defined in: sdk/components/FSComponent.ts:67
The type of context for this component, if any.
Inherited from
AbstractNumberUnitDisplay.contextType
displayUnit
protectedreadonlydisplayUnit:Subscribable<null|Unit<"navangle">>
Defined in: sdk/components/common/AbstractNumberUnitDisplay.tsx:31
A subscribable which provides the unit type in which to display the value.
Inherited from
AbstractNumberUnitDisplay.displayUnit
props
props:
BearingDisplayProps&ComponentProps
Defined in: sdk/components/FSComponent.ts:61
The properties of the component.
Inherited from
AbstractNumberUnitDisplay.props
value
protectedreadonlyvalue:Subscribable<NumberUnitInterface<"navangle",Unit<"navangle">>>
Defined in: sdk/components/common/AbstractNumberUnitDisplay.tsx:26
A subscribable which provides the value to display.
Inherited from
AbstractNumberUnitDisplay.value
Methods
destroy()
destroy():
void
Defined in: sdk/components/common/AbstractNumberUnitDisplay.tsx:57
Destroys this component.
Returns
void
Inherited from
AbstractNumberUnitDisplay.destroy
getContext()
protectedgetContext(context):never
Defined in: sdk/components/FSComponent.ts:106
Gets a context data subscription from the context collection.
Parameters
| Parameter | Type | Description |
|---|---|---|
context | never | The context to get the subscription for. |
Returns
never
The requested context.
Throws
An error if no data for the specified context type could be found.
Inherited from
AbstractNumberUnitDisplay.getContext
onAfterRender()
onAfterRender():
void
Defined in: sdk/components/common/AbstractNumberUnitDisplay.tsx:39
A callback that is called after the component is rendered.
Returns
void
Inherited from
AbstractNumberUnitDisplay.onAfterRender
onBeforeRender()
onBeforeRender():
void
Defined in: sdk/components/FSComponent.ts:80
A callback that is called before the component is rendered.
Returns
void
Inherited from
AbstractNumberUnitDisplay.onBeforeRender
onDisplayUnitChanged()
protectedonDisplayUnitChanged(displayUnit):void
Defined in: workingtitle-instruments-epic2/shared/Components/NumberDisplays/BearingDisplay.tsx:85
A callback which is called when this component's bound display unit changes.
Parameters
| Parameter | Type | Description |
|---|---|---|
displayUnit | null | Unit<"navangle"> | The new display unit. |
Returns
void
Overrides
AbstractNumberUnitDisplay.onDisplayUnitChanged
onValueChanged()
protectedonValueChanged(value):void
Defined in: workingtitle-instruments-epic2/shared/Components/NumberDisplays/BearingDisplay.tsx:68
A callback which is called when this component's bound value changes.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | NumberUnitInterface<"navangle"> | The new value. |
Returns
void
Overrides
AbstractNumberUnitDisplay.onValueChanged
render()
render():
VNode
Defined in: workingtitle-instruments-epic2/shared/Components/NumberDisplays/BearingDisplay.tsx:144
Renders the component.
Returns
A JSX element to be rendered.
Overrides
AbstractNumberUnitDisplay.render
DEFAULT_UNIT_FORMATTER()
readonlystaticDEFAULT_UNIT_FORMATTER(out,unit):void
Defined in: workingtitle-instruments-epic2/shared/Components/NumberDisplays/BearingDisplay.tsx:51
A function which formats units to default text for BearingDisplay.
Parameters
| Parameter | Type | Description |
|---|---|---|
out | [string, string] | The 2-tuple to which to write the formatted text, as [bigText, smallText]. |
unit | NavAngleUnit | The unit to format. |
Returns
void