forked from MapComplete/MapComplete
Formatting (pre-merge)
This commit is contained in:
parent
135219b5dc
commit
17b35e731e
2 changed files with 374 additions and 382 deletions
|
@ -96,7 +96,7 @@ export default class SimpleMetaTagger {
|
||||||
const [, denomination] = unit.findDenomination(value)
|
const [, denomination] = unit.findDenomination(value)
|
||||||
let canonical = denomination?.canonicalValue(value) ?? undefined;
|
let canonical = denomination?.canonicalValue(value) ?? undefined;
|
||||||
console.log("Rewritten ", key, " from", value, "into", canonical)
|
console.log("Rewritten ", key, " from", value, "into", canonical)
|
||||||
if(canonical === undefined && !unit.eraseInvalid) {
|
if (canonical === undefined && !unit.eraseInvalid) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
36
State.ts
36
State.ts
|
@ -1,13 +1,13 @@
|
||||||
import { Utils } from "./Utils";
|
import {Utils} from "./Utils";
|
||||||
import { ElementStorage } from "./Logic/ElementStorage";
|
import {ElementStorage} from "./Logic/ElementStorage";
|
||||||
import { Changes } from "./Logic/Osm/Changes";
|
import {Changes} from "./Logic/Osm/Changes";
|
||||||
import { OsmConnection } from "./Logic/Osm/OsmConnection";
|
import {OsmConnection} from "./Logic/Osm/OsmConnection";
|
||||||
import Locale from "./UI/i18n/Locale";
|
import Locale from "./UI/i18n/Locale";
|
||||||
import { UIEventSource } from "./Logic/UIEventSource";
|
import {UIEventSource} from "./Logic/UIEventSource";
|
||||||
import { LocalStorageSource } from "./Logic/Web/LocalStorageSource";
|
import {LocalStorageSource} from "./Logic/Web/LocalStorageSource";
|
||||||
import { QueryParameters } from "./Logic/Web/QueryParameters";
|
import {QueryParameters} from "./Logic/Web/QueryParameters";
|
||||||
import LayoutConfig from "./Customizations/JSON/LayoutConfig";
|
import LayoutConfig from "./Customizations/JSON/LayoutConfig";
|
||||||
import { MangroveIdentity } from "./Logic/Web/MangroveReviews";
|
import {MangroveIdentity} from "./Logic/Web/MangroveReviews";
|
||||||
import InstalledThemes from "./Logic/Actors/InstalledThemes";
|
import InstalledThemes from "./Logic/Actors/InstalledThemes";
|
||||||
import BaseLayer from "./Models/BaseLayer";
|
import BaseLayer from "./Models/BaseLayer";
|
||||||
import Loc from "./Models/Loc";
|
import Loc from "./Models/Loc";
|
||||||
|
@ -17,7 +17,7 @@ import OverpassFeatureSource from "./Logic/Actors/OverpassFeatureSource";
|
||||||
import LayerConfig from "./Customizations/JSON/LayerConfig";
|
import LayerConfig from "./Customizations/JSON/LayerConfig";
|
||||||
import TitleHandler from "./Logic/Actors/TitleHandler";
|
import TitleHandler from "./Logic/Actors/TitleHandler";
|
||||||
import PendingChangesUploader from "./Logic/Actors/PendingChangesUploader";
|
import PendingChangesUploader from "./Logic/Actors/PendingChangesUploader";
|
||||||
import { Relation } from "./Logic/Osm/ExtractRelations";
|
import {Relation} from "./Logic/Osm/ExtractRelations";
|
||||||
import OsmApiFeatureSource from "./Logic/FeatureSource/OsmApiFeatureSource";
|
import OsmApiFeatureSource from "./Logic/FeatureSource/OsmApiFeatureSource";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,17 +59,13 @@ export default class State {
|
||||||
|
|
||||||
public osmApiFeatureSource: OsmApiFeatureSource;
|
public osmApiFeatureSource: OsmApiFeatureSource;
|
||||||
|
|
||||||
public filteredLayers: UIEventSource<
|
public filteredLayers: UIEventSource<{
|
||||||
{
|
|
||||||
readonly isDisplayed: UIEventSource<boolean>;
|
readonly isDisplayed: UIEventSource<boolean>;
|
||||||
readonly layerDef: LayerConfig;
|
readonly layerDef: LayerConfig;
|
||||||
}[]
|
}[]> = new UIEventSource<{
|
||||||
> = new UIEventSource<
|
|
||||||
{
|
|
||||||
readonly isDisplayed: UIEventSource<boolean>;
|
readonly isDisplayed: UIEventSource<boolean>;
|
||||||
readonly layerDef: LayerConfig;
|
readonly layerDef: LayerConfig;
|
||||||
}[]
|
}[]>([]);
|
||||||
>([]);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The latest element that was selected
|
The latest element that was selected
|
||||||
|
@ -83,9 +79,7 @@ export default class State {
|
||||||
* Keeps track of relations: which way is part of which other way?
|
* Keeps track of relations: which way is part of which other way?
|
||||||
* Set by the overpass-updater; used in the metatagging
|
* Set by the overpass-updater; used in the metatagging
|
||||||
*/
|
*/
|
||||||
public readonly knownRelations = new UIEventSource<
|
public readonly knownRelations = new UIEventSource<Map<string, { role: string; relation: Relation }[]>>(undefined, "Relation memberships");
|
||||||
Map<string, { role: string; relation: Relation }[]>
|
|
||||||
>(undefined, "Relation memberships");
|
|
||||||
|
|
||||||
public readonly featureSwitchUserbadge: UIEventSource<boolean>;
|
public readonly featureSwitchUserbadge: UIEventSource<boolean>;
|
||||||
public readonly featureSwitchSearch: UIEventSource<boolean>;
|
public readonly featureSwitchSearch: UIEventSource<boolean>;
|
||||||
|
@ -127,9 +121,7 @@ export default class State {
|
||||||
accuracy: number;
|
accuracy: number;
|
||||||
}>(undefined);
|
}>(undefined);
|
||||||
public layoutDefinition: string;
|
public layoutDefinition: string;
|
||||||
public installedThemes: UIEventSource<
|
public installedThemes: UIEventSource<{ layout: LayoutConfig; definition: string }[]>;
|
||||||
{ layout: LayoutConfig; definition: string }[]
|
|
||||||
>;
|
|
||||||
|
|
||||||
public layerControlIsOpened: UIEventSource<boolean> =
|
public layerControlIsOpened: UIEventSource<boolean> =
|
||||||
QueryParameters.GetQueryParameter(
|
QueryParameters.GetQueryParameter(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue