Fix menu link click error and charts failing after the JSON editor #14

Merged
clayschaad merged 1 commit from fix-navlink-and-chart-loading into main 2026-10-30 21:21:11 +00:00

1 commit

Author SHA1 Message Date
c07fd2893e Fix menu link click error and charts failing after the JSON editor
- NavMenu: drop CustomToggle="true" (left over from the project
  template). It made every nav link run
  document.getElementById('navmenu-toggle').click(), but there is no
  such element, so each click threw a TypeError.
- charts.js: Monaco's AMD loader (JSON editor) leaves a global define()
  and pages switch without a full reload. Chart.js and the treemap plugin
  are UMD bundles that then register as AMD modules instead of setting
  window.Chart, so Analyse, Strom and Wasser failed with "Cannot read
  properties of undefined (reading 'defaults')" and the circuit was
  terminated. define is now hidden while they load, through one shared
  loading promise so concurrent charts can't restore it wrongly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 22:21:08 +01:00