diff --git a/Logic/ElementStorage.ts b/Logic/ElementStorage.ts index e69742dd4..444209b65 100644 --- a/Logic/ElementStorage.ts +++ b/Logic/ElementStorage.ts @@ -17,7 +17,6 @@ export class ElementStorage { addElement(element): UIEventSource { const eventSource = new UIEventSource(element.properties); - console.log("Creating a new tag storate for ", element.properties.id) this._elements[element.properties.id] = eventSource; return eventSource; } diff --git a/UI/CustomGenerator/SavePanel.ts b/UI/CustomGenerator/SavePanel.ts index 2c8422051..6279524cc 100644 --- a/UI/CustomGenerator/SavePanel.ts +++ b/UI/CustomGenerator/SavePanel.ts @@ -41,9 +41,13 @@ export default class SavePanel extends UIElement { this.json = jsonTextField; this.loadFromJson = new SubtleButton("./assets/reload.svg", "Load the JSON file below") .onClick(() => { - const json = jsonTextField.GetValue().data; - const parsed : LayoutConfigJson = JSON.parse(json); - config.setData(parsed); + try{ + const json = jsonTextField.GetValue().data; + const parsed : LayoutConfigJson = JSON.parse(json); + config.setData(parsed); + }catch(e){ + alert("Invalid JSON: "+e) + } }); } diff --git a/UI/Input/RadioButton.ts b/UI/Input/RadioButton.ts index 0a706d4c3..773ce7085 100644 --- a/UI/Input/RadioButton.ts +++ b/UI/Input/RadioButton.ts @@ -43,6 +43,9 @@ export class RadioButton extends InputElement { self._selectedElementIndex.setData(i); } }) + elements[i].GetValue().addCallback(() => { + self._selectedElementIndex.setData(i); + }) } } diff --git a/UI/Input/TextField.ts b/UI/Input/TextField.ts index 4c5a30d75..485a45476 100644 --- a/UI/Input/TextField.ts +++ b/UI/Input/TextField.ts @@ -73,12 +73,12 @@ export class TextField extends InputElement { label = this._label.Render(); } return new Combine([ - `
`, + ``, `
`, label, ``, `
`, - `
` + `` ]).Render(); }