Skip to main content

Class: MapAliasedUserSettingManager

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/MapAliasedUserSettingManager.ts:16

An aliased map user setting manager which can switch the true settings from which its aliased settings are sourced. The supported sources are:

  • Each set of display pane map settings.
  • Each set of PFD map settings.

Implements​

Constructors​

Constructor​

new MapAliasedUserSettingManager(bus): MapAliasedUserSettingManager

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/MapAliasedUserSettingManager.ts:28

Constructor.

Parameters​

ParameterTypeDescription
busEventBusThe event bus.

Returns​

MapAliasedUserSettingManager

Methods​

getAllSettings()​

getAllSettings(): UserSetting<UserSettingValue>[]

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/MapAliasedUserSettingManager.ts:76

Gets an array of all settings of this manager.

Returns​

UserSetting<UserSettingValue>[]

an array of all settings of this manager.

Implementation of​

UserSettingManager.getAllSettings


getSetting()​

getSetting<K>(name): UserSettingFromManager<G3000MapUserSettingTypes, K>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/MapAliasedUserSettingManager.ts:66

Gets a setting from this manager.

Type Parameters​

Type Parameter
K extends "mapRangeIndex" | "mapOrientation" | "mapAutoNorthUpActive" | "mapAutoNorthUpRangeIndex" | "mapGroundNorthUpActive" | "mapDeclutter" | "mapTerrainMode" | "mapTerrainRangeIndex" | "mapTerrainScaleShow" | "mapAirportLargeRangeIndex" | "mapAirportMediumRangeIndex" | "mapAirportSmallRangeIndex" | "mapVorShow" | "mapVorRangeIndex" | "mapNdbShow" | "mapNdbRangeIndex" | "mapIntersectionShow" | "mapIntersectionRangeIndex" | "mapUserWaypointShow" | "mapUserWaypointRangeIndex" | "mapAirspaceClassBRangeIndex" | "mapAirspaceClassCRangeIndex" | "mapAirspaceClassDRangeIndex" | "mapAirspaceRestrictedRangeIndex" | "mapAirspaceMoaRangeIndex" | "mapAirspaceOtherRangeIndex" | "mapTrafficShow" | "mapTrafficRangeIndex" | "mapTrafficLabelShow" | "mapTrafficLabelRangeIndex" | "mapTrafficAlertLevelMode" | "mapNexradShow" | "mapNexradRangeIndex" | "mapTrackVectorShow" | "mapTrackVectorLookahead" | "mapAltitudeArcShow" | "mapWindVectorShow" | "mapAirspaceShow" | "mapAirportShow" | "mapInsetMode" | "mapInsetTextCumulative"

Parameters​

ParameterTypeDescription
nameKThe name of the setting to get.

Returns​

UserSettingFromManager<G3000MapUserSettingTypes, K>

The requested setting.

Throws​

Error if no setting with the specified name exists.

Implementation of​

UserSettingManager.getSetting


mapTo()​

mapTo<M>(map): UserSettingManager<M & Omit<MapUserSettingTypes, G3000MapDelegatedUserSettingNames> & G3000SpecificMapUserSettingTypes>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/MapAliasedUserSettingManager.ts:81

Maps a subset of this manager's settings to ones with aliased names, and creates a new setting manager which supports accessing the settings using their aliases.

Type Parameters​

Type Parameter
M extends UserSettingRecord

Parameters​

ParameterTypeDescription
mapUserSettingMap<M, G3000MapUserSettingTypes>A map defining the aliases of a subset of this manager's settings, with aliased setting names as keys and original setting names as values.

Returns​

UserSettingManager<M & Omit<MapUserSettingTypes, G3000MapDelegatedUserSettingNames> & G3000SpecificMapUserSettingTypes>

A new setting manager which supports accessing a subset of this manager's settings using aliased names.

Implementation of​

UserSettingManager.mapTo


tryGetSetting()​

tryGetSetting<K>(name): OptionalUserSettingFromManager<G3000MapUserSettingTypes, K>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/MapAliasedUserSettingManager.ts:61

Attempts to get a setting from this manager.

Type Parameters​

Type Parameter
K extends string

Parameters​

ParameterTypeDescription
nameKThe name of the setting to get.

Returns​

OptionalUserSettingFromManager<G3000MapUserSettingTypes, K>

The requested setting, or undefined if no such setting exists.

Implementation of​

UserSettingManager.tryGetSetting


useDisplayPaneSettings()​

useDisplayPaneSettings(index): void

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/MapAliasedUserSettingManager.ts:48

Switches the source of this manager's settings to a set of display pane map settings.

Parameters​

ParameterTypeDescription
indexControllableDisplayPaneIndexThe index of the display pane.

Returns​

void


usePfdSettings()​

usePfdSettings(index): void

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/MapAliasedUserSettingManager.ts:56

Switches the source of this manager's settings to a set of PFD map settings.

Parameters​

ParameterTypeDescription
indexPfdIndexThe index of the PFD.

Returns​

void


whenSettingChanged()​

whenSettingChanged<K>(name): UserSettingConsumerFromManager<G3000MapUserSettingTypes, K>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/MapAliasedUserSettingManager.ts:71

Gets a consumer which notifies handlers when the value of a setting changes.

Type Parameters​

Type Parameter
K extends "mapRangeIndex" | "mapOrientation" | "mapAutoNorthUpActive" | "mapAutoNorthUpRangeIndex" | "mapGroundNorthUpActive" | "mapDeclutter" | "mapTerrainMode" | "mapTerrainRangeIndex" | "mapTerrainScaleShow" | "mapAirportLargeRangeIndex" | "mapAirportMediumRangeIndex" | "mapAirportSmallRangeIndex" | "mapVorShow" | "mapVorRangeIndex" | "mapNdbShow" | "mapNdbRangeIndex" | "mapIntersectionShow" | "mapIntersectionRangeIndex" | "mapUserWaypointShow" | "mapUserWaypointRangeIndex" | "mapAirspaceClassBRangeIndex" | "mapAirspaceClassCRangeIndex" | "mapAirspaceClassDRangeIndex" | "mapAirspaceRestrictedRangeIndex" | "mapAirspaceMoaRangeIndex" | "mapAirspaceOtherRangeIndex" | "mapTrafficShow" | "mapTrafficRangeIndex" | "mapTrafficLabelShow" | "mapTrafficLabelRangeIndex" | "mapTrafficAlertLevelMode" | "mapNexradShow" | "mapNexradRangeIndex" | "mapTrackVectorShow" | "mapTrackVectorLookahead" | "mapAltitudeArcShow" | "mapWindVectorShow" | "mapAirspaceShow" | "mapAirportShow" | "mapInsetMode" | "mapInsetTextCumulative"

Parameters​

ParameterTypeDescription
nameKThe name of a setting.

Returns​

UserSettingConsumerFromManager<G3000MapUserSettingTypes, K>

a consumer which notifies handlers when the value of the setting changes.

Throws​

Error if no setting with the specified name exists.

Deprecated​

Please use getSetting(name).sub() instead.

Implementation of​

UserSettingManager.whenSettingChanged