Skip to content

Commit

Permalink
Makes zones available on initial page load
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredjensen committed Jul 27, 2024
1 parent 0b880a8 commit ee59f36
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export class WidgetGaugeNgRadialComponent extends BaseWidgetComponent implements

ngOnInit() {
//TODO: simplify initialization
this.initWidget();
const gaugeSize = this.wrapper.nativeElement.getBoundingClientRect();
this.gaugeOptions.height = Math.floor(gaugeSize.height * this.WIDGET_SIZE_FACTOR);
this.gaugeOptions.width = Math.floor(gaugeSize.width * this.WIDGET_SIZE_FACTOR);
Expand Down Expand Up @@ -129,6 +128,8 @@ export class WidgetGaugeNgRadialComponent extends BaseWidgetComponent implements
}
});

this.initWidget();

this.metaSub = this.zones$.subscribe(zones => {
if (zones && zones.length > 0 && this.widgetProperties.config.gauge.subType == "measuring") {
this.setHighlights(zones);
Expand Down

0 comments on commit ee59f36

Please sign in to comment.