Skip to content

Commit

Permalink
sparkline fix
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacbowen committed Feb 24, 2024
1 parent 87ae92d commit e7b0eda
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class SphereWithRods {
this.sparklineContext.beginPath();

// placing this slightly inside the canvas, to ensure that the line is not cut off
for (let x = 10; x <= this.sparklineCanvas.width - 20; x++) {
for (let x = 10; x <= this.sparklineCanvas.width - 10; x++) {
const t = x / this.sparklineCanvas.width;
const y = this.calculateFrequency(t) * (this.sparklineCanvas.height - 20) + 10;
this.sparklineContext.lineTo(x, this.sparklineCanvas.height - y);
Expand Down

0 comments on commit e7b0eda

Please sign in to comment.