Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Apr 18, 2024
1 parent d3625d0 commit 4c7e151
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/app/components/metergroup/metergroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ export class MeterGroup implements AfterContentInit {

iconTemplate: TemplateRef<any> | undefined;

container = ViewChild('container', { read: ElementRef });
@ViewChild('container', { read: ElementRef }) container: ElementRef;

containerEffect = effect(() => {
const _container = this.container();
const height = DomHandler.getOuterHeight(_container.nativeElement);
this.vertical && (this.container().nativeElement.style.height = height + 'px');
});
ngAfterViewInit() {
const _container = this.container.nativeElement;
const height = DomHandler.getOuterHeight(_container);
this.vertical && (_container.style.height = height + 'px');
}

ngAfterContentInit() {
this.templates?.forEach((item) => {
Expand Down Expand Up @@ -179,9 +179,11 @@ export class MeterGroup implements AfterContentInit {

return Math.round(Math.max(0, Math.min(100, percentOfItem)));
}

percentValue(meter) {
return this.percent(meter) + '%';
}

meterStyle(val) {
return {
backgroundColor: val.color,
Expand Down

0 comments on commit 4c7e151

Please sign in to comment.