diff --git a/static/watch.js b/static/watch.js index 6f89b7ac4..44fff3821 100644 --- a/static/watch.js +++ b/static/watch.js @@ -5,7 +5,7 @@ window.addEventListener("DOMContentLoaded", () => { function init(reconnectDelay) { const d2ErrDiv = window.document.querySelector("#d2-err"); - const d2SVG = window.document.querySelector("#d2-svg"); + const d2SVG = window.document.querySelector("#d2-svg-container"); const devMode = document.body.dataset.d2DevMode === "true"; const ws = new WebSocket( @@ -34,7 +34,7 @@ function init(reconnectDelay) { // out the width, height and viewbox out of the top level SVG tag and update those manually. d2SVG.innerHTML = msg.svg; - const svgEl = d2SVG.querySelector("svg"); + const svgEl = d2SVG.querySelector("#d2-svg"); let width = parseInt(svgEl.getAttribute("width"), 10); let height = parseInt(svgEl.getAttribute("height"), 10); if (isInit) { diff --git a/watch.go b/watch.go index 5bc99e5e3..9263ccfba 100644 --- a/watch.go +++ b/watch.go @@ -430,7 +430,7 @@ func (w *watcher) handleRoot(hw http.ResponseWriter, r *http.Request) {
- +