Console logging

This commit is contained in:
Pieter Vander Vennet 2020-11-02 12:38:04 +01:00
parent 6118d734c0
commit 4f3135caef
6 changed files with 10 additions and 16 deletions

View file

@ -447,7 +447,6 @@ export class InitUiElements {
const queryParam = QueryParameters.GetQueryParameter("background", State.state.layoutToUse.data.defaultBackground);
queryParam.addCallbackAndRun((selectedId:string) => {
console.log("Selected layer is ", selectedId)
const available = State.state.availableBackgroundLayers.data;
for (const layer of available) {
if (layer.id === selectedId) {

View file

@ -125,14 +125,18 @@ export default class MetaTagging {
public static carriageWayWidth = new SimpleMetaTagger(
["_width:needed","_width:needed:no_pedestrians", "_width:difference"],
"Legacy for a specific project calculating the needed width for safe traffic on a road",
"Legacy for a specific project calculating the needed width for safe traffic on a road. Only activated if 'width:carriageway' is present",
(feature: any, index: number) => {
const properties = feature.properties;
if(properties["width:carriageway"] === undefined){
return;
}
const carWidth = 2;
const cyclistWidth = 1.5;
const pedestrianWidth = 0.75;
const properties = feature.properties;
const _leftSideParking =
new And([new Tag("parking:lane:left", "parallel"), new Tag("parking:lane:right", "no_parking")]);

View file

@ -31,12 +31,8 @@ export class ImageCarousel extends UIElement{
this.slideshow = new SlideShow(uiElements).HideOnEmpty(true);
}
InnerRender(): string {
return this.slideshow.Render();
}
IsKnown(): boolean {
return true;
}
}

View file

@ -51,8 +51,6 @@ export class SimpleAddUI extends UIElement {
const presets = layer.layerDef.presets;
for (const preset of presets) {
console.log("Preset:", preset)
let icon: string = layer.layerDef.icon.GetRenderValue(
TagUtils.KVtoProperties(preset.tags ?? [])).txt ??
"./assets/bug.svg";

View file

@ -22,18 +22,18 @@ export class SubstitutedTranslation extends UIElement {
this.translation = translation;
this.tags = tags;
const self = this;
this.dumbMode = false;
Locale.language.addCallbackAndRun(() => {
self.content = self.CreateContent();
self.Update();
});
this.dumbMode = false;
}
InnerRender(): string {
return new Combine(this.content).Render();
}
private CreateContent(): UIElement[] {
let txt = this.translation?.txt;
if (txt === undefined) {

View file

@ -10,9 +10,6 @@ import svg2img from 'promise-svg2img';
import {Translation} from "./UI/i18n/Translations";
import Translations from "./UI/i18n/Translations";
console.log("Building the layouts")
function enc(str: string): string {
return encodeURIComponent(str.toLowerCase());
}