Class: ConvertableNumberAndUnitFormat
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/Framework/FmcFormats.ts:345
Format for number with unit entries that is convertable based on the sim's unit system.
Implements
Constructors
Constructor
new ConvertableNumberAndUnitFormat(
imperialUnit,metricUnit,options,nullValueString,conditionalStyle):ConvertableNumberAndUnitFormat
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/Framework/FmcFormats.ts:356
CTOR
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
imperialUnit | Unit<any> | undefined | The type of the imperial unit. |
metricUnit | Unit<any> | undefined | The type of the metric unit. |
options | Partial<ConvertableNumberAndUnitFormatOptions> | {} | Format options. |
nullValueString | string | '' | null value string. |
conditionalStyle | (value) => string | ... | A function that can return a style string. |
Returns
ConvertableNumberAndUnitFormat
Properties
conditionalStyle()
protectedreadonlyconditionalStyle: (value) =>string
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/Framework/FmcFormats.ts:360
A function that can return a style string.
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
string
imperialUnit
protectedreadonlyimperialUnit:Unit<any>
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/Framework/FmcFormats.ts:357
The type of the imperial unit.
metricUnit
protectedreadonlymetricUnit:Unit<any>
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/Framework/FmcFormats.ts:357
The type of the metric unit.
nullValueString
readonlynullValueString:string=''
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/Framework/FmcFormats.ts:359
null value string.
Implementation of
options
protectedreadonlyoptions:ConvertableNumberAndUnitFormatOptions
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/Framework/FmcFormats.ts:346
Methods
format()
format(
value):string
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/Framework/FmcFormats.ts:398
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
string
Inherit Doc
Implementation of
parse()
parse(
input):null|number
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/Framework/FmcFormats.ts:378
Parameters
| Parameter | Type |
|---|---|
input | string |
Returns
null | number