Cleanup of empty classes, partial use of default export

This commit is contained in:
Pieter Vander Vennet 2020-10-02 19:00:24 +02:00
parent cc75f5c4fd
commit 9970c4b8bb
55 changed files with 939 additions and 206 deletions

View file

@ -6,7 +6,7 @@ import {GeoOperations} from "./GeoOperations";
import {UIElement} from "../UI/UIElement";
import {LayerDefinition} from "../Customizations/LayerDefinition";
import codegrid from "codegrid-js";
import {State} from "../State";
import State from "../State";
/***
* A filtered layer is a layer which offers a 'set-data' function
@ -301,7 +301,6 @@ export class FilteredLayer {
eventSource.addCallback(updateStyle);
function openPopup(e) {
State.state.selectedElement.data?.feature.updateStyle();
State.state.selectedElement.setData({feature: feature});
updateStyle()
if (feature.geometry.type === "Point") {

View file

@ -3,7 +3,7 @@ import {UIEventSource} from "./UIEventSource";
import {FilteredLayer} from "./FilteredLayer";
import {Bounds} from "./Bounds";
import {Overpass} from "./Osm/Overpass";
import {State} from "../State";
import State from "../State";
import {LayerDefinition} from "../Customizations/LayerDefinition";
export class LayerUpdater {

View file

@ -1,7 +1,7 @@
import L from "leaflet";
import * as L from "leaflet";
import {UIEventSource} from "../UIEventSource";
import {UIElement} from "../../UI/UIElement";
import {State} from "../../State";
import State from "../../State";
import {Utils} from "../../Utils";
import {Basemap} from "./Basemap";

View file

@ -1,6 +1,6 @@
import L from "leaflet";
import * as L from "leaflet";
import {UIElement} from "../../UI/UIElement";
import {State} from "../../State";
import State from "../../State";
/**
* The stray-click-hanlders adds a marker to the map if no feature was clicked.

9
Logic/OpeningHours.ts Normal file
View file

@ -0,0 +1,9 @@
export interface OpeningHour {
weekdayStart: number, // 0 is monday, 1 is tuesday, ...
weekdayEnd: number,
startHour: number,
startMinutes: number,
endHour: number,
endMinutes: number
}

View file

@ -4,7 +4,7 @@
*/
import {OsmNode, OsmObject} from "./OsmObject";
import {And, Tag, TagsFilter} from "../Tags";
import {State} from "../../State";
import State from "../../State";
import {Utils} from "../../Utils";
export class Changes {

View file

@ -2,7 +2,7 @@ import {OsmConnection, UserDetails} from "./OsmConnection";
import {UIEventSource} from "../UIEventSource";
import {ElementStorage} from "../ElementStorage";
import {Layout} from "../../Customizations/Layout";
import {State} from "../../State";
import State from "../../State";
import Locale from "../../UI/i18n/Locale";
export class ChangesetHandler {

View file

@ -1,6 +1,6 @@
import {Basemap} from "../Leaflet/Basemap";
import $ from "jquery"
import {State} from "../../State";
import State from "../../State";
export class Geocoding {
private static readonly host = "https://nominatim.openstreetmap.org/search?";

View file

@ -4,7 +4,7 @@
import {UIEventSource} from "../UIEventSource";
import {ImageUploadFlow} from "../../UI/ImageUploadFlow";
import {SlideShow} from "../../UI/SlideShow";
import {State} from "../../State";
import State from "../../State";
import {Tag} from "../Tags";
export class OsmImageUploadHandler {