From d395153dca51a0706a729ab3bfd71420be527a23 Mon Sep 17 00:00:00 2001 From: litruv Date: Tue, 8 Sep 2026 23:17:20 +1000 Subject: [PATCH] feat: expose showDebugPanel API and add panel toggle method --- website/scripts/DebugPanel.js | 5 +++++ website/scripts/main.js | 3 +++ 2 files changed, 8 insertions(+) diff --git a/website/scripts/DebugPanel.js b/website/scripts/DebugPanel.js index c433bf3..ed75f4b 100644 --- a/website/scripts/DebugPanel.js +++ b/website/scripts/DebugPanel.js @@ -201,6 +201,11 @@ export class DebugPanel { /** @returns {string | null} */ get lastActiveId() { return this.#lastActiveId; } + /** Expands the debug panel if it is collapsed. */ + show() { + this.#panel.classList.remove("collapsed"); + } + /** * Sets the draggable checkbox to the given value without firing the change callback. * diff --git a/website/scripts/main.js b/website/scripts/main.js index 1d2de45..6516e04 100644 --- a/website/scripts/main.js +++ b/website/scripts/main.js @@ -311,6 +311,9 @@ const debugPanel = new DebugPanel(debugPanelEl, } ); +// Browser DevTools command: showDebugPanel() +window.showDebugPanel = () => debugPanel.show(); + // Connection SVG is screen-space — must re-render on every pan/zoom so paths track node positions. let hasTransformed = false; let trackTransform = false;