Refactoring: move the units into the layers instead of the themes

This commit is contained in:
Pieter Vander Vennet 2021-09-13 01:21:47 +02:00
parent 3492b5d403
commit 206aff2c9a
16 changed files with 259 additions and 300 deletions

View file

@ -1,5 +1,23 @@
export default interface UnitConfigJson {
/**
* Every key from this list will be normalized
*/
appliesToKey: string[],
/**
* If set, invalid values will be erased in the MC application (but not in OSM of course!)
* Be careful with setting this
*/
eraseInvalidValues?: boolean;
/**
* The possible denominations
*/
applicableUnits:ApplicableUnitJson[]
}
export interface ApplicableUnitJson
{
/**
* The canonical value which will be added to the text.
* e.g. "m" for meters
@ -32,5 +50,4 @@ export default interface UnitConfigJson {
* If none is set, the first unit will be considered the default interpretation of a value without a unit
*/
default?: boolean
}