diff options
| author | stonedDiscord <Tukz@gmx.de> | 2022-03-18 21:04:09 +0100 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2022-03-18 21:04:09 +0100 |
| commit | 4a10c280d2112003ce1ce8c9041190290a858c08 (patch) | |
| tree | 6a27bc7217c96dbaf0a8595d9ccdf574359a3aea /webAO/ui.js | |
| parent | 7700da3b537697e58e41e50ca7e724986099b66b (diff) | |
| parent | ef69cb63da031129db046d9b5f1f5b9feb57ee34 (diff) | |
Merge branch 'master' into coolloading
Diffstat (limited to 'webAO/ui.js')
| -rw-r--r-- | webAO/ui.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/webAO/ui.js b/webAO/ui.js index 9e95be9..0baad1d 100644 --- a/webAO/ui.js +++ b/webAO/ui.js @@ -1,7 +1,6 @@ /* eslint indent: ["error", 2] */ -// import GoldenLayout from "./golden/js/goldenlayout.js"; -import GoldenLayout from 'golden-layout'; +import { GoldenLayout } from "golden-layout"; const config = { settings: { @@ -67,12 +66,12 @@ const config = { }], }; -const golden = new GoldenLayout(config); -golden.registerComponent('template', (container, componentState) => { +const golden = new GoldenLayout(); +golden.registerComponentFactoryFunction('template', (container, componentState) => { const template = document.querySelector(`#${componentState.id}`); - container.getElement().html(template.content); + container.element.innerHTML = template.innerHTML; // TODO: support multiple locales // container.setTitle(document.querySelector(`#${componentState.id} meta[name='frame-title']`).getAttribute("content")); }); +golden.loadLayout(config) -golden.init(); |
