Interface: BearingDisplayProps
Defined in: workingtitle-instruments-epic2/shared/Components/NumberDisplays/BearingDisplay.tsx:9
Component props for BearingDisplay.
Extends
Omit<AbstractNumberUnitDisplayProps<NavAngleUnitFamily>,"value"|"displayUnit">
Properties
children?
optionalchildren:DisplayChildren[]
Defined in: sdk/components/FSComponent.ts:122
The children of the display component.
Inherited from
Omit.children
class?
optionalclass:string|ToggleableClassNameRecord|SubscribableSet<string>
Defined in: workingtitle-instruments-epic2/shared/Components/NumberDisplays/BearingDisplay.tsx:38
CSS class(es) to add to the root of the bearing display component.
displayUnit
displayUnit:
null|NavAngleUnit|Subscribable<null|NavAngleUnit>
Defined in: workingtitle-instruments-epic2/shared/Components/NumberDisplays/BearingDisplay.tsx:17
The unit type in which to display the value, or a subscribable which provides it. If the unit is null, then the
native type of the value is used instead.
formatter()
formatter: (
number) =>string
Defined in: workingtitle-instruments-epic2/shared/Components/NumberDisplays/BearingDisplay.tsx:20
A function which formats numbers.
Parameters
| Parameter | Type |
|---|---|
number | number |
Returns
string
hideDegreeSymbolWhenNan?
optionalhideDegreeSymbolWhenNan:boolean
Defined in: workingtitle-instruments-epic2/shared/Components/NumberDisplays/BearingDisplay.tsx:35
Whether to hide the unit text when the displayed value is equal to NaN. Defaults to false.
ref?
optionalref:NodeReference<any>
Defined in: sdk/components/FSComponent.ts:125
A reference to the display component.
Inherited from
Omit.ref
unitFormatter()?
optionalunitFormatter: (out,unit,number) =>void
Defined in: workingtitle-instruments-epic2/shared/Components/NumberDisplays/BearingDisplay.tsx:29
A function which formats units. The formatted unit text should be written to the 2-tuple passed to the out
parameter, as [bigText, smallText]. bigText and smallText will be rendered into separate <span> elements
representing the big and small components of the rendered unit text, respectively. If not defined, then units
will be formatted such that bigText is always the degree symbol (°) and smallText is empty for magnetic
bearing or 'T' for true bearing.
Parameters
| Parameter | Type |
|---|---|
out | [string, string] |
unit | NavAngleUnit |
number | number |
Returns
void
use360?
optionaluse360:boolean
Defined in: workingtitle-instruments-epic2/shared/Components/NumberDisplays/BearingDisplay.tsx:32
Whether to display '360' in place of '0'. Defaults to true.
value
value:
NumberUnitInterface<"navangle",NavAngleUnit> |Subscribable<NumberUnitInterface<"navangle",NavAngleUnit>>
Defined in: workingtitle-instruments-epic2/shared/Components/NumberDisplays/BearingDisplay.tsx:11
The NumberUnitInterface value to display, or a subscribable which provides it.