Skip to content

Commit

Permalink
GH page: fix canvas size
Browse files Browse the repository at this point in the history
  • Loading branch information
th-ch committed Jan 18, 2021
1 parent 3bcf409 commit e19964e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,7 @@ <h1 class="m-0">
<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">
Expand Down
4 changes: 2 additions & 2 deletions docs/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit e19964e

Please sign in to comment.