forked from MapComplete/MapComplete
Add a personal, configurable quest
This commit is contained in:
parent
9c42839f01
commit
7ec00a3301
21 changed files with 376 additions and 237 deletions
|
@ -4,26 +4,27 @@ import { CheckBox } from "./Input/CheckBox";
|
|||
import Combine from "./Base/Combine";
|
||||
import {Utils} from "../Utils";
|
||||
import {Img} from "./Img";
|
||||
import {State} from "../State";
|
||||
|
||||
export class LayerSelection extends UIElement{
|
||||
export class LayerSelection extends UIElement {
|
||||
|
||||
private readonly _checkboxes: UIElement[];
|
||||
|
||||
constructor(layers: FilteredLayer[]) {
|
||||
super(undefined);
|
||||
this._checkboxes = [];
|
||||
|
||||
for (const layer of layers) {
|
||||
const checkbox = `<svg width="26" height="18" viewBox="0 0 26 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
constructor() {
|
||||
super(undefined);
|
||||
this._checkboxes = [];
|
||||
|
||||
for (const layer of State.state.filteredLayers.data) {
|
||||
const checkbox = `<svg width="26" height="18" viewBox="0 0 26 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3 7.28571L10.8261 15L23 3" stroke="#003B8B" stroke-width="4" stroke-linejoin="round"/>
|
||||
</svg>`;
|
||||
let icon = "<img >";
|
||||
if (layer.layerDef.icon && layer.layerDef.icon !== "") {
|
||||
icon = `<img width="20" height="20" src="${layer.layerDef.icon}" alt="">`
|
||||
}
|
||||
const name = layer.layerDef.name;
|
||||
let icon = "<img >";
|
||||
if (layer.layerDef.icon && layer.layerDef.icon !== "") {
|
||||
icon = `<img width="20" height="20" src="${layer.layerDef.icon}" alt="">`
|
||||
}
|
||||
const name = layer.layerDef.name;
|
||||
|
||||
this._checkboxes.push(new CheckBox(
|
||||
this._checkboxes.push(new CheckBox(
|
||||
new Combine([checkbox, icon, name]),
|
||||
new Combine([
|
||||
Img.no_checkmark,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue