Small code fixes, fix #198
This commit is contained in:
parent
1b73f0a43a
commit
1831365597
5 changed files with 7 additions and 10 deletions
|
@ -40,7 +40,7 @@ export default class ScrollableFullScreen extends UIElement {
|
|||
new Combine([returnToTheMap, title])
|
||||
.SetClass("border-b-2 border-black shadow md:shadow-none bg-white p-2 pb-0 md:p-0 flex overflow-x-hidden flex-shrink-0 max-h-20vh"),
|
||||
new Combine([content, ornament])
|
||||
.SetClass("p-2 md:pt-4 w-full h-full overflow-y-auto overflow-x-hidden md:max-h-65vh"),
|
||||
.SetClass("block p-2 md:pt-4 w-full h-full overflow-y-auto overflow-x-hidden md:max-h-65vh"),
|
||||
// We add an ornament which takes around 5em. This is in order to make sure the Web UI doesn't hide
|
||||
]).SetClass("flex flex-col h-full relative bg-white")
|
||||
]).SetClass("fixed top-0 left-0 right-0 h-screen w-screen md:max-h-65vh md:w-auto md:relative");
|
||||
|
|
|
@ -48,7 +48,8 @@ export default class PersonalLayersPanel extends UIElement {
|
|||
layout.title,
|
||||
"</b><br/>",
|
||||
layout.shortDescription ?? ""
|
||||
]).SetStyle("background: #eee; display: block; padding: 0.5em; border-radius:0.5em; overflow:auto;")
|
||||
]).SetClass("block p1 overflow-auto rounded")
|
||||
.SetStyle("background: #eee;")
|
||||
this.checkboxes.push(header);
|
||||
|
||||
for (const layer of layout.layers) {
|
||||
|
|
|
@ -24,10 +24,8 @@ export default class CheckBoxes extends InputElement<number[]> {
|
|||
|
||||
|
||||
IsValid(ts: number[]): boolean {
|
||||
if (ts === undefined) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return ts !== undefined;
|
||||
|
||||
}
|
||||
|
||||
GetValue(): UIEventSource<number[]> {
|
||||
|
@ -48,7 +46,7 @@ export default class CheckBoxes extends InputElement<number[]> {
|
|||
body += htmlElement;
|
||||
|
||||
}
|
||||
|
||||
|
||||
return `<form id='${this.id}'>${body}</form>`;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ export class RadioButton<T> extends InputElement<T> {
|
|||
self._selectedElementIndex.setData(i);
|
||||
})
|
||||
}
|
||||
this.dumbMode = false;
|
||||
|
||||
}
|
||||
|
||||
|
@ -69,7 +70,6 @@ export class RadioButton<T> extends InputElement<T> {
|
|||
}
|
||||
|
||||
InnerRender(): string {
|
||||
|
||||
let body = "";
|
||||
for (let i = 0; i < this._elements.length; i++){
|
||||
const el = this._elements[i];
|
||||
|
@ -119,7 +119,6 @@ export class RadioButton<T> extends InputElement<T> {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
const el = document.getElementById(this.id);
|
||||
el.addEventListener("change",
|
||||
function () {
|
||||
|
|
1
index.ts
1
index.ts
|
@ -10,7 +10,6 @@ import MoreScreen from "./UI/BigComponents/MoreScreen";
|
|||
import State from "./State";
|
||||
import Combine from "./UI/Base/Combine";
|
||||
import Translations from "./UI/i18n/Translations";
|
||||
import {UIElement} from "./UI/UIElement";
|
||||
|
||||
let defaultLayout = ""
|
||||
// --------------------- Special actions based on the parameters -----------------
|
||||
|
|
Loading…
Reference in a new issue