Skip to main content

Interface: BearingDisplayProps

Component props for BearingDisplay.

Hierarchy

  • Omit<AbstractNumberUnitDisplayProps<NavAngleUnitFamily>, "value" | "displayUnit">

    BearingDisplayProps

Properties

children

Optional children: DisplayChildren[]

The children of the display component.

Inherited from

Omit.children

Defined in

src/sdk/components/FSComponent.ts:122


class

Optional class: string | ToggleableClassNameRecord | SubscribableSet<string>

CSS class(es) to add to the root of the bearing display component.

Defined in

src/garminsdk/components/common/BearingDisplay.tsx:38


displayUnit

displayUnit: null | NavAngleUnit | Subscribable<null | NavAngleUnit>

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.

Defined in

src/garminsdk/components/common/BearingDisplay.tsx:17


formatter

formatter: (number: number) => string

A function which formats numbers.

Type declaration

▸ (number): string

A function which formats numbers.

Parameters
NameType
numbernumber
Returns

string

Defined in

src/garminsdk/components/common/BearingDisplay.tsx:20


hideDegreeSymbolWhenNan

Optional hideDegreeSymbolWhenNan: boolean

Whether to hide the unit text when the displayed value is equal to NaN. Defaults to false.

Defined in

src/garminsdk/components/common/BearingDisplay.tsx:35


ref

Optional ref: NodeReference<any>

A reference to the display component.

Inherited from

Omit.ref

Defined in

src/sdk/components/FSComponent.ts:125


unitFormatter

Optional unitFormatter: (out: [string, string], unit: NavAngleUnit, number: number) => void

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.

Type declaration

▸ (out, unit, number): void

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
NameType
out[string, string]
unitNavAngleUnit
numbernumber
Returns

void

Defined in

src/garminsdk/components/common/BearingDisplay.tsx:29


use360

Optional use360: boolean

Whether to display '360' in place of '0'. Defaults to true.

Defined in

src/garminsdk/components/common/BearingDisplay.tsx:32


value

value: NumberUnitInterface<"navangle", NavAngleUnit> | Subscribable<NumberUnitInterface<"navangle", NavAngleUnit>>

The NumberUnitInterface value to display, or a subscribable which provides it.

Defined in

src/garminsdk/components/common/BearingDisplay.tsx:11