GH page: fix canvas size

This commit is contained in:
TC
2021-01-18 21:58:18 +01:00
parent 3bcf409f2b
commit e19964edf6
2 changed files with 3 additions and 8 deletions

View File

@ -86,12 +86,7 @@
<section class="hero text-center text-light">
<div class="hero-bg"></div>
<div class="hero-particles-container">
<canvas
id="hero-particles"
width="2558"
height="1478"
style="width: 1279px; height: 739px;"
></canvas>
<canvas id="hero-particles"></canvas>
</div>
<div class="container-sm">
<div class="hero-inner">

View File

@ -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;
};