forked from MapComplete/MapComplete
Fixes and simplification of the CSS
This commit is contained in:
parent
c7f33a9490
commit
6d5f4ade25
24 changed files with 191 additions and 344 deletions
|
@ -1,20 +1,19 @@
|
|||
import {UIElement} from "../UIElement";
|
||||
import { FilteredLayer } from "../../Logic/FilteredLayer";
|
||||
import Translations from "../../UI/i18n/Translations";
|
||||
import {UIEventSource} from "../../Logic/UIEventSource";
|
||||
|
||||
export class CheckBox extends UIElement{
|
||||
public readonly isEnabled: UIEventSource<boolean>;
|
||||
private readonly _showEnabled: string|UIElement;
|
||||
private readonly _showDisabled: string|UIElement;
|
||||
private readonly _showEnabled: UIElement;
|
||||
private readonly _showDisabled: UIElement;
|
||||
|
||||
constructor(showEnabled: string | UIElement, showDisabled: string | UIElement, data: UIEventSource<boolean> | boolean = false) {
|
||||
super(undefined);
|
||||
this.isEnabled =
|
||||
data instanceof UIEventSource ? data : new UIEventSource(data ?? false);
|
||||
this.ListenTo(this.isEnabled);
|
||||
this._showEnabled = showEnabled;
|
||||
this._showDisabled = showDisabled;
|
||||
this._showEnabled = Translations.W(showEnabled);
|
||||
this._showDisabled =Translations.W(showDisabled);
|
||||
const self = this;
|
||||
this.onClick(() => {
|
||||
self.isEnabled.setData(!self.isEnabled.data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue