This commit is contained in:
jelveh
2024-11-04 17:33:13 -08:00
3 changed files with 15 additions and 1 deletions
@@ -110,6 +110,9 @@ async function UIWindowSettings(options){
const component = tab.factory();
component.attach(tab_placeholders[i]);
}
if ( tab.reinitialize ) {
tab.reinitialize();
}
if ( tab.dom ) {
tab_placeholders[i].replaceWith(tab.dom);
}
+6
View File
@@ -93,6 +93,12 @@ export default def(class UIElement extends AdvancedBase {
this.make(this);
}
reinitialize () {
this.root = document.createElement(this.tagName);
this.make(this);
return this.root;
}
async open_as_window (options = {}) {
const placeholder = Placeholder();
console.log('window options?', this.windowOptions);
+6 -1
View File
@@ -49,7 +49,12 @@ export class SettingsService extends Service {
const ui_element = tab;
tab = {
...ui_element.as(TSettingsTab).get_metadata(),
dom: ui_element.root,
reinitialize () {
ui_element.reinitialize();
},
get dom () {
return ui_element.root;
},
};
}
this.#tabs.push(tab);