From ee59f3666574321aa09498b07b2855a54fcc7569 Mon Sep 17 00:00:00 2001 From: Jared Jensen Date: Sat, 27 Jul 2024 12:06:50 -0700 Subject: [PATCH] Makes zones available on initial page load --- .../widget-gauge-ng-radial/widget-gauge-ng-radial.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/widgets/widget-gauge-ng-radial/widget-gauge-ng-radial.component.ts b/src/app/widgets/widget-gauge-ng-radial/widget-gauge-ng-radial.component.ts index 90785a9e..53301f5e 100644 --- a/src/app/widgets/widget-gauge-ng-radial/widget-gauge-ng-radial.component.ts +++ b/src/app/widgets/widget-gauge-ng-radial/widget-gauge-ng-radial.component.ts @@ -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); @@ -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);