Formatting

This commit is contained in:
Pieter Vander Vennet 2021-07-23 15:56:22 +02:00
parent 332081c0db
commit ebf866f138
3 changed files with 1294 additions and 1293 deletions

View file

@ -1,22 +1,22 @@
import Translations from "../../UI/i18n/Translations";
import TagRenderingConfig from "./TagRenderingConfig";
import { LayerConfigJson } from "./LayerConfigJson";
import { FromJSON } from "./FromJSON";
import {LayerConfigJson} from "./LayerConfigJson";
import {FromJSON} from "./FromJSON";
import SharedTagRenderings from "../SharedTagRenderings";
import { TagRenderingConfigJson } from "./TagRenderingConfigJson";
import { Translation } from "../../UI/i18n/Translation";
import {TagRenderingConfigJson} from "./TagRenderingConfigJson";
import {Translation} from "../../UI/i18n/Translation";
import Svg from "../../Svg";
import { Utils } from "../../Utils";
import {Utils} from "../../Utils";
import Combine from "../../UI/Base/Combine";
import { VariableUiElement } from "../../UI/Base/VariableUIElement";
import { UIEventSource } from "../../Logic/UIEventSource";
import { FixedUiElement } from "../../UI/Base/FixedUiElement";
import {VariableUiElement} from "../../UI/Base/VariableUIElement";
import {UIEventSource} from "../../Logic/UIEventSource";
import {FixedUiElement} from "../../UI/Base/FixedUiElement";
import SourceConfig from "./SourceConfig";
import { TagsFilter } from "../../Logic/Tags/TagsFilter";
import { Tag } from "../../Logic/Tags/Tag";
import {TagsFilter} from "../../Logic/Tags/TagsFilter";
import {Tag} from "../../Logic/Tags/Tag";
import BaseUIElement from "../../UI/BaseUIElement";
import { Unit } from "./Denomination";
import {Unit} from "./Denomination";
import DeleteConfig from "./DeleteConfig";
import FilterConfig from "./FilterConfig";
@ -279,7 +279,7 @@ export default class LayerConfig {
};
});
const iconPath = this.icon.GetRenderValue({ id: "node/-1" }).txt;
const iconPath = this.icon.GetRenderValue({id: "node/-1"}).txt;
if (iconPath.startsWith(Utils.assets_path)) {
const iconKey = iconPath.substr(Utils.assets_path.length);
if (Svg.All[iconKey] === undefined) {

View file

@ -1,19 +1,19 @@
import { CenterFlexedElement } from "./UI/Base/CenterFlexedElement";
import { FixedUiElement } from "./UI/Base/FixedUiElement";
import {CenterFlexedElement} from "./UI/Base/CenterFlexedElement";
import {FixedUiElement} from "./UI/Base/FixedUiElement";
import Toggle from "./UI/Input/Toggle";
import { Basemap } from "./UI/BigComponents/Basemap";
import {Basemap} from "./UI/BigComponents/Basemap";
import State from "./State";
import LoadFromOverpass from "./Logic/Actors/OverpassFeatureSource";
import { UIEventSource } from "./Logic/UIEventSource";
import { QueryParameters } from "./Logic/Web/QueryParameters";
import {UIEventSource} from "./Logic/UIEventSource";
import {QueryParameters} from "./Logic/Web/QueryParameters";
import StrayClickHandler from "./Logic/Actors/StrayClickHandler";
import SimpleAddUI from "./UI/BigComponents/SimpleAddUI";
import CenterMessageBox from "./UI/CenterMessageBox";
import UserBadge from "./UI/BigComponents/UserBadge";
import SearchAndGo from "./UI/BigComponents/SearchAndGo";
import GeoLocationHandler from "./Logic/Actors/GeoLocationHandler";
import { LocalStorageSource } from "./Logic/Web/LocalStorageSource";
import { Utils } from "./Utils";
import {LocalStorageSource} from "./Logic/Web/LocalStorageSource";
import {Utils} from "./Utils";
import Svg from "./Svg";
import Link from "./UI/Base/Link";
import * as personal from "./assets/themes/personalLayout/personalLayout.json";
@ -34,14 +34,14 @@ import MapControlButton from "./UI/MapControlButton";
import Combine from "./UI/Base/Combine";
import SelectedFeatureHandler from "./Logic/Actors/SelectedFeatureHandler";
import LZString from "lz-string";
import { LayoutConfigJson } from "./Customizations/JSON/LayoutConfigJson";
import {LayoutConfigJson} from "./Customizations/JSON/LayoutConfigJson";
import AttributionPanel from "./UI/BigComponents/AttributionPanel";
import ContributorCount from "./Logic/ContributorCount";
import FeatureSource from "./Logic/FeatureSource/FeatureSource";
import AllKnownLayers from "./Customizations/AllKnownLayers";
import LayerConfig from "./Customizations/JSON/LayerConfig";
import AvailableBaseLayers from "./Logic/Actors/AvailableBaseLayers";
import { SimpleMapScreenshoter } from "leaflet-simple-map-screenshoter";
import {SimpleMapScreenshoter} from "leaflet-simple-map-screenshoter";
import jsPDF from "jspdf";
import FilterView from "./UI/BigComponents/FilterView";
@ -59,7 +59,8 @@ export class InitUiElements {
`Error: incorrect layout <i>${layoutName}</i><br/><a href='https://${window.location.host}/'>Go back</a>`
)
.AttachTo("centermessage")
.onClick(() => {});
.onClick(() => {
});
throw "Incorrect layout";
}
@ -187,7 +188,7 @@ export class InitUiElements {
iconSize: [30, 30],
iconAnchor: [15, 15],
});
const marker = L.marker([home.lat, home.lon], { icon: icon });
const marker = L.marker([home.lat, home.lon], {icon: icon});
marker.addTo(State.state.leafletMap.data);
});
@ -238,7 +239,7 @@ export class InitUiElements {
let doc = new jsPDF();
screenshotter.takeScreen('image').then(image => {
// TO DO: scale image on pdf to its original size
doc.addImage(image, 'PNG', 0, 0, screen.width/10, screen.height/10);
doc.addImage(image, 'PNG', 0, 0, screen.width / 10, screen.height / 10);
doc.setDisplayMode('fullheight');
doc.save("Screenshot");
});

View file

@ -1,12 +1,12 @@
import * as L from "leaflet";
import { UIEventSource } from "../UIEventSource";
import { Utils } from "../../Utils";
import {UIEventSource} from "../UIEventSource";
import {Utils} from "../../Utils";
import Svg from "../../Svg";
import Img from "../../UI/Base/Img";
import { LocalStorageSource } from "../Web/LocalStorageSource";
import {LocalStorageSource} from "../Web/LocalStorageSource";
import LayoutConfig from "../../Customizations/JSON/LayoutConfig";
import { VariableUiElement } from "../../UI/Base/VariableUIElement";
import { CenterFlexedElement } from "../../UI/Base/CenterFlexedElement";
import {VariableUiElement} from "../../UI/Base/VariableUIElement";
import {CenterFlexedElement} from "../../UI/Base/CenterFlexedElement";
export default class GeoLocationHandler extends VariableUiElement {
/**
@ -141,7 +141,7 @@ export default class GeoLocationHandler extends VariableUiElement {
iconAnchor: [20, 20], // point of the icon which will correspond to marker's location
});
const newMarker = L.marker(location.latlng, { icon: icon });
const newMarker = L.marker(location.latlng, {icon: icon});
newMarker.addTo(map);
if (self._marker !== undefined) {
@ -152,7 +152,7 @@ export default class GeoLocationHandler extends VariableUiElement {
try {
navigator?.permissions
?.query({ name: "geolocation" })
?.query({name: "geolocation"})
?.then(function (status) {
console.log("Geolocation is already", status);
if (status.state === "granted") {