aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_elements/reactive-background
diff options
context:
space:
mode:
authorDanijel Anđelković <adanijel99@gmail.com>2022-04-23 03:08:09 +0200
committerDanijel Anđelković <adanijel99@gmail.com>2022-04-23 03:08:09 +0200
commit2cf5c882b130b00ea906cfaafc7fef2e4eeefa6c (patch)
tree1302222dd832592d3f20bba276cb21634c3ad3fb /frontend/src/app/_elements/reactive-background
parent6fe49c5cd6ef20dc477f11dac098e4c18c2584ee (diff)
Ispravio BUG gde pri osvezavanju strane pozadina se ucita pre korisnickih podesavanja za pozadinu. Povecao max broj tacaka.
Diffstat (limited to 'frontend/src/app/_elements/reactive-background')
-rw-r--r--frontend/src/app/_elements/reactive-background/reactive-background.component.ts15
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();
}