Finish refactoring

This commit is contained in:
Pieter Vander Vennet 2020-11-06 04:02:53 +01:00
parent dc1dde6c3d
commit b764371cce
55 changed files with 76 additions and 3201 deletions

View file

@ -1,6 +1,8 @@
import * as L from "leaflet";
import {UIElement} from "../../UI/UIElement";
import State from "../../State";
import {Img} from "../../UI/Img";
import Svg from "../../Svg";
/**
* The stray-click-hanlders adds a marker to the map if no feature was clicked.
@ -33,7 +35,7 @@ export class StrayClickHandler {
}
self._lastMarker = L.marker([lastClick.lat, lastClick.lon], {
icon: L.icon({
iconUrl: "./assets/add.svg",
iconUrl: Img.AsData(Svg.add),
iconSize: [50, 50],
iconAnchor: [25, 50],
popupAnchor: [0, -45]

View file

@ -5,6 +5,8 @@ import {OsmPreferences} from "./OsmPreferences";
import {ChangesetHandler} from "./ChangesetHandler";
import {Layout} from "../../Customizations/Layout";
import {ElementStorage} from "../ElementStorage";
import {Img} from "../../UI/Img";
import Svg from "../../Svg";
export class UserDetails {
@ -157,7 +159,7 @@ export class OsmConnection {
if (imgEl !== undefined && imgEl[0] !== undefined) {
data.img = imgEl[0].getAttribute("href");
}
data.img = data.img ?? "./assets/osm-logo.svg";
data.img = data.img ?? Img.AsData(Svg.osm_logo);
const homeEl = userInfo.getElementsByTagName("home");
if (homeEl !== undefined && homeEl[0] !== undefined) {