From bb4afc831107711e1bbf2dda6e814eec89bf2784 Mon Sep 17 00:00:00 2001 From: Kari Lavikka Date: Fri, 10 Jan 2025 10:38:29 +0200 Subject: [PATCH] adds configurable lil-gui root folder state --- src/gui/gui.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/gui.ts b/src/gui/gui.ts index d9b346c..849baee 100644 --- a/src/gui/gui.ts +++ b/src/gui/gui.ts @@ -26,7 +26,8 @@ export function setupGui( container: HTMLElement, tables: DataTables, customLayoutProps: Partial = {}, - customCostWeights: Partial = {} + customCostWeights: Partial = {}, + openControls = true ) { container.innerHTML = HTML_TEMPLATE; @@ -54,6 +55,9 @@ export function setupGui( generalProps.patient ??= patients[0]; const gui = new GUI({ container: jellyfishGui }); + if (!openControls) { + gui.close(); + } gui.onChange(saveSettings); const isGuiOpen = () => !gui._closed;