forked from MapComplete/MapComplete
Chore: auto-formatting
This commit is contained in:
parent
996d9e43be
commit
0e94cc707b
7 changed files with 49 additions and 40 deletions
|
@ -1,8 +1,8 @@
|
||||||
import { Utils } from "../../Utils";
|
import { Utils } from "../../Utils"
|
||||||
import polygon_features from "../../assets/polygon-features.json";
|
import polygon_features from "../../assets/polygon-features.json"
|
||||||
import { OsmFeature, OsmId, OsmTags, WayId } from "../../Models/OsmFeature";
|
import { OsmFeature, OsmId, OsmTags, WayId } from "../../Models/OsmFeature"
|
||||||
import OsmToGeoJson from "osmtogeojson";
|
import OsmToGeoJson from "osmtogeojson"
|
||||||
import { Feature, LineString, Polygon } from "geojson";
|
import { Feature, LineString, Polygon } from "geojson"
|
||||||
|
|
||||||
export abstract class OsmObject {
|
export abstract class OsmObject {
|
||||||
private static defaultBackend = "https://www.openstreetmap.org/"
|
private static defaultBackend = "https://www.openstreetmap.org/"
|
||||||
|
|
|
@ -56,7 +56,10 @@
|
||||||
on:mouseup={() => {
|
on:mouseup={() => {
|
||||||
isDown = false
|
isDown = false
|
||||||
}}
|
}}
|
||||||
on:touchmove={(e) =>{ onPosChange(e.touches[0].clientX, e.touches[0].clientY); e.preventDefault() }}
|
on:touchmove={(e) => {
|
||||||
|
onPosChange(e.touches[0].clientX, e.touches[0].clientY)
|
||||||
|
e.preventDefault()
|
||||||
|
}}
|
||||||
on:touchstart={(e) => onPosChange(e.touches[0].clientX, e.touches[0].clientY)}
|
on:touchstart={(e) => onPosChange(e.touches[0].clientX, e.touches[0].clientY)}
|
||||||
>
|
>
|
||||||
<div class="absolute top-0 left-0 h-full w-full cursor-pointer">
|
<div class="absolute top-0 left-0 h-full w-full cursor-pointer">
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
|
|
||||||
<div class="min-h-32 relative h-full cursor-pointer overflow-hidden">
|
<div class="min-h-32 relative h-full cursor-pointer overflow-hidden">
|
||||||
<div class="absolute top-0 left-0 h-full w-full cursor-pointer">
|
<div class="absolute top-0 left-0 h-full w-full cursor-pointer">
|
||||||
<MaplibreMap center={({lng: initialCoordinate.lon, lat: initialCoordinate.lat})}} {map} />
|
<MaplibreMap center="{{ lng: initialCoordinate.lon, lat: initialCoordinate.lat }}}" {map} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
import { onMount } from "svelte"
|
import { onMount } from "svelte"
|
||||||
import { Map } from "@onsvisual/svelte-maps"
|
import { Map } from "@onsvisual/svelte-maps"
|
||||||
import type { Map as MaplibreMap } from "maplibre-gl"
|
import type { Map as MaplibreMap } from "maplibre-gl"
|
||||||
import type {Readable, Writable} from "svelte/store"
|
import type { Readable, Writable } from "svelte/store"
|
||||||
import { AvailableRasterLayers } from "../../Models/RasterLayers"
|
import { AvailableRasterLayers } from "../../Models/RasterLayers"
|
||||||
import {writable} from "svelte/store";
|
import { writable } from "svelte/store"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Beware: this map will _only_ be set by this component
|
* Beware: this map will _only_ be set by this component
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
export let map: Writable<MaplibreMap>
|
export let map: Writable<MaplibreMap>
|
||||||
|
|
||||||
export let attribution = false
|
export let attribution = false
|
||||||
export let center: Readable<{ lng: number ,lat : number }> = writable({lng: 0, lat: 0})
|
export let center: Readable<{ lng: number; lat: number }> = writable({ lng: 0, lat: 0 })
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
$map.on("load", function () {
|
$map.on("load", function () {
|
||||||
|
|
|
@ -1,14 +1,20 @@
|
||||||
<script>
|
<script>
|
||||||
import Tr from "./Base/Tr.svelte";
|
import Tr from "./Base/Tr.svelte"
|
||||||
import Translations from "./i18n/Translations.ts";
|
import Translations from "./i18n/Translations.ts"
|
||||||
import BackButton from "./Base/BackButton.svelte";
|
import BackButton from "./Base/BackButton.svelte"
|
||||||
console.log("???")
|
console.log("???")
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<Tr t={Translations.t.general["404"]}></Tr>
|
<Tr t={Translations.t.general["404"]} />
|
||||||
<BackButton clss="m-8" on:click={() => {window.location = "index.html"}}>
|
<BackButton
|
||||||
|
clss="m-8"
|
||||||
|
on:click={() => {
|
||||||
|
window.location = "index.html"
|
||||||
|
}}
|
||||||
|
>
|
||||||
<div class="flex w-full justify-center">
|
<div class="flex w-full justify-center">
|
||||||
<Tr t={Translations.t.general.backToIndex}></Tr>
|
<Tr t={Translations.t.general.backToIndex} />
|
||||||
</div>
|
</div>
|
||||||
</BackButton>
|
</BackButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {Store, UIEventSource} from "../Logic/UIEventSource"
|
import { Store, UIEventSource } from "../Logic/UIEventSource"
|
||||||
import {Map as MlMap} from "maplibre-gl"
|
import { Map as MlMap } from "maplibre-gl"
|
||||||
import MaplibreMap from "./Map/MaplibreMap.svelte"
|
import MaplibreMap from "./Map/MaplibreMap.svelte"
|
||||||
import FeatureSwitchState from "../Logic/State/FeatureSwitchState"
|
import FeatureSwitchState from "../Logic/State/FeatureSwitchState"
|
||||||
import MapControlButton from "./Base/MapControlButton.svelte"
|
import MapControlButton from "./Base/MapControlButton.svelte"
|
||||||
import ToSvelte from "./Base/ToSvelte.svelte"
|
import ToSvelte from "./Base/ToSvelte.svelte"
|
||||||
import If from "./Base/If.svelte"
|
import If from "./Base/If.svelte"
|
||||||
import {GeolocationControl} from "./BigComponents/GeolocationControl"
|
import { GeolocationControl } from "./BigComponents/GeolocationControl"
|
||||||
import type {Feature} from "geojson"
|
import type { Feature } from "geojson"
|
||||||
import SelectedElementView from "./BigComponents/SelectedElementView.svelte"
|
import SelectedElementView from "./BigComponents/SelectedElementView.svelte"
|
||||||
import LayerConfig from "../Models/ThemeConfig/LayerConfig"
|
import LayerConfig from "../Models/ThemeConfig/LayerConfig"
|
||||||
import Filterview from "./BigComponents/Filterview.svelte"
|
import Filterview from "./BigComponents/Filterview.svelte"
|
||||||
import ThemeViewState from "../Models/ThemeViewState"
|
import ThemeViewState from "../Models/ThemeViewState"
|
||||||
import type {MapProperties} from "../Models/MapProperties"
|
import type { MapProperties } from "../Models/MapProperties"
|
||||||
import Geosearch from "./BigComponents/Geosearch.svelte"
|
import Geosearch from "./BigComponents/Geosearch.svelte"
|
||||||
import Translations from "./i18n/Translations"
|
import Translations from "./i18n/Translations"
|
||||||
import {CogIcon, EyeIcon, MenuIcon, XCircleIcon} from "@rgossiaux/svelte-heroicons/solid"
|
import { CogIcon, EyeIcon, MenuIcon, XCircleIcon } from "@rgossiaux/svelte-heroicons/solid"
|
||||||
|
|
||||||
import Tr from "./Base/Tr.svelte"
|
import Tr from "./Base/Tr.svelte"
|
||||||
import CommunityIndexView from "./BigComponents/CommunityIndexView.svelte"
|
import CommunityIndexView from "./BigComponents/CommunityIndexView.svelte"
|
||||||
|
@ -29,29 +29,29 @@
|
||||||
import CopyrightPanel from "./BigComponents/CopyrightPanel"
|
import CopyrightPanel from "./BigComponents/CopyrightPanel"
|
||||||
import DownloadPanel from "./DownloadFlow/DownloadPanel.svelte"
|
import DownloadPanel from "./DownloadFlow/DownloadPanel.svelte"
|
||||||
import ModalRight from "./Base/ModalRight.svelte"
|
import ModalRight from "./Base/ModalRight.svelte"
|
||||||
import {Utils} from "../Utils"
|
import { Utils } from "../Utils"
|
||||||
import Hotkeys from "./Base/Hotkeys"
|
import Hotkeys from "./Base/Hotkeys"
|
||||||
import {VariableUiElement} from "./Base/VariableUIElement"
|
import { VariableUiElement } from "./Base/VariableUIElement"
|
||||||
import SvelteUIElement from "./Base/SvelteUIElement"
|
import SvelteUIElement from "./Base/SvelteUIElement"
|
||||||
import OverlayToggle from "./BigComponents/OverlayToggle.svelte"
|
import OverlayToggle from "./BigComponents/OverlayToggle.svelte"
|
||||||
import LevelSelector from "./BigComponents/LevelSelector.svelte"
|
import LevelSelector from "./BigComponents/LevelSelector.svelte"
|
||||||
import ExtraLinkButton from "./BigComponents/ExtraLinkButton"
|
import ExtraLinkButton from "./BigComponents/ExtraLinkButton"
|
||||||
import SelectedElementTitle from "./BigComponents/SelectedElementTitle.svelte"
|
import SelectedElementTitle from "./BigComponents/SelectedElementTitle.svelte"
|
||||||
import Svg from "../Svg"
|
import Svg from "../Svg"
|
||||||
import {ShareScreen} from "./BigComponents/ShareScreen"
|
import { ShareScreen } from "./BigComponents/ShareScreen"
|
||||||
import ThemeIntroPanel from "./BigComponents/ThemeIntroPanel.svelte"
|
import ThemeIntroPanel from "./BigComponents/ThemeIntroPanel.svelte"
|
||||||
import type {RasterLayerPolygon} from "../Models/RasterLayers"
|
import type { RasterLayerPolygon } from "../Models/RasterLayers"
|
||||||
import {AvailableRasterLayers} from "../Models/RasterLayers"
|
import { AvailableRasterLayers } from "../Models/RasterLayers"
|
||||||
import RasterLayerOverview from "./Map/RasterLayerOverview.svelte"
|
import RasterLayerOverview from "./Map/RasterLayerOverview.svelte"
|
||||||
import IfHidden from "./Base/IfHidden.svelte"
|
import IfHidden from "./Base/IfHidden.svelte"
|
||||||
import {onDestroy} from "svelte"
|
import { onDestroy } from "svelte"
|
||||||
import {OpenJosm} from "./BigComponents/OpenJosm"
|
import { OpenJosm } from "./BigComponents/OpenJosm"
|
||||||
import MapillaryLink from "./BigComponents/MapillaryLink.svelte"
|
import MapillaryLink from "./BigComponents/MapillaryLink.svelte"
|
||||||
import OpenIdEditor from "./BigComponents/OpenIdEditor.svelte"
|
import OpenIdEditor from "./BigComponents/OpenIdEditor.svelte"
|
||||||
import OpenBackgroundSelectorButton from "./BigComponents/OpenBackgroundSelectorButton.svelte"
|
import OpenBackgroundSelectorButton from "./BigComponents/OpenBackgroundSelectorButton.svelte"
|
||||||
import StateIndicator from "./BigComponents/StateIndicator.svelte"
|
import StateIndicator from "./BigComponents/StateIndicator.svelte"
|
||||||
import LanguagePicker from "./LanguagePicker";
|
import LanguagePicker from "./LanguagePicker"
|
||||||
import Locale from "./i18n/Locale";
|
import Locale from "./i18n/Locale"
|
||||||
|
|
||||||
export let state: ThemeViewState
|
export let state: ThemeViewState
|
||||||
let layout = state.layout
|
let layout = state.layout
|
||||||
|
@ -393,7 +393,7 @@
|
||||||
<!-- All shown components are set by 'usersettings.json', which happily uses some special visualisations created specifically for it -->
|
<!-- All shown components are set by 'usersettings.json', which happily uses some special visualisations created specifically for it -->
|
||||||
<LoginToggle {state}>
|
<LoginToggle {state}>
|
||||||
<div class="flex flex-col" slot="not-logged-in">
|
<div class="flex flex-col" slot="not-logged-in">
|
||||||
<ToSvelte construct={() => new LanguagePicker(layout.language, Locale.language)}/>
|
<ToSvelte construct={() => new LanguagePicker(layout.language, Locale.language)} />
|
||||||
<Tr cls="alert" t={Translations.t.userinfo.notLoggedIn} />
|
<Tr cls="alert" t={Translations.t.userinfo.notLoggedIn} />
|
||||||
<LoginButton clss="primary" osmConnection={state.osmConnection} />
|
<LoginButton clss="primary" osmConnection={state.osmConnection} />
|
||||||
</div>
|
</div>
|
||||||
|
|
16
package-lock.json
generated
16
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "mapcomplete",
|
"name": "mapcomplete",
|
||||||
"version": "0.30.6",
|
"version": "0.30.9",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "mapcomplete",
|
"name": "mapcomplete",
|
||||||
"version": "0.30.6",
|
"version": "0.30.9",
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@onsvisual/svelte-maps": "^1.1.6",
|
"@onsvisual/svelte-maps": "^1.1.6",
|
||||||
|
@ -4475,9 +4475,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001492",
|
"version": "1.0.30001516",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001492.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001516.tgz",
|
||||||
"integrity": "sha512-2efF8SAZwgAX1FJr87KWhvuJxnGJKOnctQa8xLOskAXNXq8oiuqgl6u1kk3fFpsp3GgvzlRjiK1sl63hNtFADw==",
|
"integrity": "sha512-Wmec9pCBY8CWbmI4HsjBeQLqDTqV91nFVR83DnZpYyRnPI1wePDsTg0bGLPC5VU/3OIZV1fmxEea1b+tFKe86g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -15512,9 +15512,9 @@
|
||||||
"integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA=="
|
"integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA=="
|
||||||
},
|
},
|
||||||
"caniuse-lite": {
|
"caniuse-lite": {
|
||||||
"version": "1.0.30001492",
|
"version": "1.0.30001516",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001492.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001516.tgz",
|
||||||
"integrity": "sha512-2efF8SAZwgAX1FJr87KWhvuJxnGJKOnctQa8xLOskAXNXq8oiuqgl6u1kk3fFpsp3GgvzlRjiK1sl63hNtFADw==",
|
"integrity": "sha512-Wmec9pCBY8CWbmI4HsjBeQLqDTqV91nFVR83DnZpYyRnPI1wePDsTg0bGLPC5VU/3OIZV1fmxEea1b+tFKe86g==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"canvg": {
|
"canvg": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue