41 lines
948 B
TypeScript
41 lines
948 B
TypeScript
|
|
import {Component} from '@angular/core';
|
||
|
|
import {MatCard, MatCardContent, MatCardHeader, MatCardTitle} from '@angular/material/card';
|
||
|
|
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
||
|
|
import {ParticleManagerService} from '../../services/particle-manager.service';
|
||
|
|
|
||
|
|
@Component({
|
||
|
|
selector: 'app-particle',
|
||
|
|
imports: [
|
||
|
|
MatCard,
|
||
|
|
MatCardContent,
|
||
|
|
MatCardHeader,
|
||
|
|
MatCardTitle,
|
||
|
|
ReactiveFormsModule,
|
||
|
|
FormsModule
|
||
|
|
],
|
||
|
|
templateUrl: './particle.component.html',
|
||
|
|
styleUrl: './particle.component.scss'
|
||
|
|
})
|
||
|
|
export class ParticleComponent {
|
||
|
|
|
||
|
|
constructor(
|
||
|
|
private particleManagerService: ParticleManagerService,
|
||
|
|
) {
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Get the selected color
|
||
|
|
*/
|
||
|
|
public get selectedColor(): string {
|
||
|
|
return this.particleManagerService.getSelectedColor();
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Set the selected color
|
||
|
|
*/
|
||
|
|
public set selectedColor(color: string) {
|
||
|
|
this.particleManagerService.setSelectedColor(color);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|