From e19964edf6a389160f6b6dfef5e569addf5837e6 Mon Sep 17 00:00:00 2001 From: TC Date: Mon, 18 Jan 2021 21:58:18 +0100 Subject: [PATCH] GH page: fix canvas size --- docs/index.html | 7 +------ docs/js/main.js | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/index.html b/docs/index.html index 86eb9c70..22a2e8e5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -86,12 +86,7 @@
- +
diff --git a/docs/js/main.js b/docs/js/main.js index bcbd69d6..ed47bfc1 100644 --- a/docs/js/main.js +++ b/docs/js/main.js @@ -156,8 +156,8 @@ starCanvas.prototype.start = function () { let h; const setCanvasExtents = () => { - w = document.body.clientWidth; - h = document.body.clientHeight; + w = this.canvas.parentNode.clientWidth; + h = this.canvas.parentNode.clientHeight; this.canvas.width = w; this.canvas.height = h; };