Skip to main content

Class: BearingDisplay

Displays a bearing value.

Hierarchy

  • AbstractNumberUnitDisplay<NavAngleUnitFamily, BearingDisplayProps>

    BearingDisplay

Constructors

constructor

new BearingDisplay(props): BearingDisplay

Creates an instance of a DisplayComponent.

Parameters

NameTypeDescription
propsBearingDisplayPropsThe propertis of the component.

Returns

BearingDisplay

Inherited from

AbstractNumberUnitDisplay<NavAngleUnitFamily, BearingDisplayProps>.constructor

Defined in

src/sdk/components/FSComponent.ts:73

Properties

context

Optional context: [] = undefined

The context on this component, if any.

Inherited from

AbstractNumberUnitDisplay.context

Defined in

src/sdk/components/FSComponent.ts:64


contextType

Optional Readonly contextType: readonly [] = undefined

The type of context for this component, if any.

Inherited from

AbstractNumberUnitDisplay.contextType

Defined in

src/sdk/components/FSComponent.ts:67


displayUnit

Protected Readonly displayUnit: Subscribable<null | Unit<"navangle">>

A subscribable which provides the unit type in which to display the value.

Inherited from

AbstractNumberUnitDisplay.displayUnit

Defined in

src/sdk/components/common/AbstractNumberUnitDisplay.tsx:31


props

props: BearingDisplayProps & ComponentProps

The properties of the component.

Inherited from

AbstractNumberUnitDisplay.props

Defined in

src/sdk/components/FSComponent.ts:61


value

Protected Readonly value: Subscribable<NumberUnitInterface<"navangle", Unit<"navangle">>>

A subscribable which provides the value to display.

Inherited from

AbstractNumberUnitDisplay.value

Defined in

src/sdk/components/common/AbstractNumberUnitDisplay.tsx:26

Methods

destroy

destroy(): void

Returns

void

Inherit Doc

Inherited from

AbstractNumberUnitDisplay.destroy

Defined in

src/sdk/components/common/AbstractNumberUnitDisplay.tsx:57


getContext

getContext(context): never

Gets a context data subscription from the context collection.

Parameters

NameTypeDescription
contextneverThe 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

Defined in

src/sdk/components/FSComponent.ts:106


onAfterRender

onAfterRender(): void

Returns

void

Inherit Doc

Inherited from

AbstractNumberUnitDisplay.onAfterRender

Defined in

src/sdk/components/common/AbstractNumberUnitDisplay.tsx:39


onBeforeRender

onBeforeRender(): void

A callback that is called before the component is rendered.

Returns

void

Inherited from

AbstractNumberUnitDisplay.onBeforeRender

Defined in

src/sdk/components/FSComponent.ts:80


onDisplayUnitChanged

onDisplayUnitChanged(displayUnit): void

Parameters

NameType
displayUnitnull | Unit<"navangle">

Returns

void

Inherit Doc

Overrides

AbstractNumberUnitDisplay.onDisplayUnitChanged

Defined in

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


onValueChanged

onValueChanged(value): void

Parameters

NameType
valueNumberUnitInterface<"navangle", Unit<"navangle">>

Returns

void

Inherit Doc

Overrides

AbstractNumberUnitDisplay.onValueChanged

Defined in

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


render

render(): VNode

Returns

VNode

Inherit Doc

Overrides

AbstractNumberUnitDisplay.render

Defined in

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


DEFAULT_UNIT_FORMATTER

DEFAULT_UNIT_FORMATTER(out, unit): void

A function which formats units to default text for BearingDisplay.

Parameters

NameTypeDescription
out[string, string]The 2-tuple to which to write the formatted text, as [bigText, smallText].
unitNavAngleUnitThe unit to format.

Returns

void

Defined in

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