diff options
Diffstat (limited to 'frontend/src/app/_elements')
-rw-r--r-- | frontend/src/app/_elements/reactive-background/reactive-background.component.ts | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/frontend/src/app/_elements/reactive-background/reactive-background.component.ts b/frontend/src/app/_elements/reactive-background/reactive-background.component.ts index 4cafbc6d..97387ac8 100644 --- a/frontend/src/app/_elements/reactive-background/reactive-background.component.ts +++ b/frontend/src/app/_elements/reactive-background/reactive-background.component.ts @@ -145,10 +145,10 @@ export class ReactiveBackgroundComponent implements AfterViewInit { } drawPoint(p: Point) { - this.ctx!.fillStyle = this.pointColor; - this.ctx!.beginPath(); - this.ctx!.arc(p.x * this.width, p.y * this.height, p.size * this.screenDepth(p.x), 0, 2 * Math.PI); - this.ctx!.fill(); + this.ctx.fillStyle = this.pointColor; + this.ctx.beginPath(); + this.ctx.arc(p.x * this.width, p.y * this.height, p.size * this.screenDepth(p.x), 0, 2 * Math.PI); + this.ctx.fill(); } resize() { @@ -161,6 +161,13 @@ export class ReactiveBackgroundComponent implements AfterViewInit { this.canvas.height = this.height; } + if (this.cookie.check('animateBackground')) { + this.animate = this.cookie.get('animateBackground') == 'true'; + } + if (this.cookie.check('backgroundFill')) { + this.fill = parseFloat(this.cookie.get('backgroundFill')); + } + this.drawBackground(); } |