More cleaning up

This commit is contained in:
Pieter Vander Vennet 2021-01-04 04:36:21 +01:00
parent 778044d0fb
commit 4948524f91
22 changed files with 36 additions and 65 deletions

View file

@ -12,6 +12,7 @@ import Combine from "../Base/Combine";
import {FixedUiElement} from "../Base/FixedUiElement";
import Translations from "../i18n/Translations";
import Constants from "../../Models/Constants";
import LayerConfig from "../../Customizations/JSON/LayerConfig";
export default class SimpleAddUI extends UIElement {
private readonly _addButtons: UIElement[];
@ -24,7 +25,7 @@ export default class SimpleAddUI extends UIElement {
icon: UIElement,
tags: Tag[],
layerToAddTo: {
name: UIElement | string,
layerDef: LayerConfig,
isDisplayed: UIEventSource<boolean> }
}>
= new UIEventSource(undefined);
@ -128,7 +129,7 @@ export default class SimpleAddUI extends UIElement {
if(!this._confirmPreset.data.layerToAddTo.isDisplayed.data){
return new Combine([
Translations.t.general.add.layerNotEnabled.Subs({layer: this._confirmPreset.data.layerToAddTo.name})
Translations.t.general.add.layerNotEnabled.Subs({layer: this._confirmPreset.data.layerToAddTo.layerDef.name})
.SetClass("alert"),
this.openLayerControl,