Css tweaking

This commit is contained in:
Pieter Vander Vennet 2020-07-23 16:28:19 +02:00
parent 2e7b14061f
commit ef593654f4
6 changed files with 33 additions and 47 deletions

View file

@ -12,20 +12,24 @@ export class LayerSelection extends UIElement{
this._checkboxes = [];
for (const layer of layers) {
this._checkboxes.push(new CheckBox(
new Combine([
`<svg width="26" height="18" viewBox="0 0 26 18" fill="none" xmlns="http://www.w3.org/2000/svg">
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>`,
`<img width="20" height="20" src="${layer.layerDef.icon}" alt="">`,
layer.layerDef.name]),
new Combine([
`<svg width="26" height="18" viewBox="0 0 26 18" fill="none" xmlns="http://www.w3.org/2000/svg">
</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;
this._checkboxes.push(new CheckBox(
new Combine([checkbox, icon, name]),
new Combine([
`<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="#ffffff" stroke-width="4" stroke-linejoin="round"/>
</svg>`,
`<img width="20" height="20" src="${layer.layerDef.icon}" alt="">`,
layer.layerDef.name]),
layer.isDisplayed));
icon,
layer.layerDef.name]),
layer.isDisplayed));
}
}