diff --git a/static/canvas-renderer.js b/static/canvas-renderer.js index cfc5bb5..a8a12c1 100644 --- a/static/canvas-renderer.js +++ b/static/canvas-renderer.js @@ -40,13 +40,14 @@ class CanvasRenderer extends HTMLElement { // To properly handle DPI scaling, we want the canvas's layout size to be equal to that of // its parent container, - this.style.width = `${width}px`; - this.style.height = `${height}px`; this.canvas.width = width * window.devicePixelRatio; this.canvas.height = height * window.devicePixelRatio; // Rerender immediately after the canvas is resized, as its contents have now been invalidated. this.#render(); + + // Send a viewport update so that the server knows to send new chunks. + this.sendViewportUpdate(); } getWindowSize() {