diff options
| author | Caleb Mabry <36182383+caleb-mabry@users.noreply.github.com> | 2022-03-23 15:31:04 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-23 15:31:04 -0400 |
| commit | 46d63b5ba4eeb30ac1f5add49b03b1aed8ae0328 (patch) | |
| tree | 228ef1f017ce0320f3d210a557d2803a03ec73e1 /webAO/ui.js | |
| parent | 0b6b4b085cee48248fe2025a2514252ee20ee774 (diff) | |
| parent | 2e734ec14fc760f80e2a9dc81cdf9269220bb791 (diff) | |
Merge branch 'master' into moving-audio-channels
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(); |
