diff --git a/public/js/components/interactive-diagram.js b/public/js/components/interactive-diagram.js index d91be405..800bfe2b 100644 --- a/public/js/components/interactive-diagram.js +++ b/public/js/components/interactive-diagram.js @@ -125,8 +125,15 @@ class InteractiveDiagram { return; } - const svg = svgDoc.getElementById('interactive-arch-diagram'); + // The SVG is the document element itself, or we can query for it + let svg = svgDoc.getElementById('interactive-arch-diagram'); if (!svg) { + // Try getting the root SVG element + svg = svgDoc.documentElement; + console.log('[InteractiveDiagram] Using documentElement as SVG'); + } + + if (!svg || svg.tagName !== 'svg') { console.warn('[InteractiveDiagram] SVG diagram not found in contentDocument'); return; }