Fix website quest

This commit is contained in:
Pieter Vander Vennet 2020-07-29 20:09:25 +02:00
parent ca391e948d
commit 51d38e3354
4 changed files with 31 additions and 6 deletions

View file

@ -13,9 +13,11 @@ import {SubtleButton} from "./Base/SubtleButton";
export class MoreScreen extends UIElement {
private currentLocation: UIEventSource<{ zoom: number, lat: number, lon: number }>;
private currentLayout: string;
constructor(currentLocation: UIEventSource<{ zoom: number, lat: number, lon: number }>) {
constructor(currentLayout: string, currentLocation: UIEventSource<{ zoom: number, lat: number, lon: number }>) {
super(currentLocation);
this.currentLayout = currentLayout;
this.currentLocation = currentLocation;
}
@ -28,6 +30,9 @@ export class MoreScreen extends UIElement {
if (layout.hideFromOverview) {
continue
}
if (layout.name === this.currentLayout) {
continue;
}
const linkText =
`https://pietervdvn.github.io/MapComplete/${layout.name}.html?z=${this.currentLocation.data.zoom}&lat=${this.currentLocation.data.lat}&lon=${this.currentLocation.data.lon}`