From 22d584317bfefdedd94781906c1d4c26f4146618 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Fri, 21 Mar 2025 18:43:48 +0200 Subject: [PATCH] UI: Fix analoque gauges bug on resize. --- .../home/components/widget/lib/analogue-gauge.models.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/analogue-gauge.models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/analogue-gauge.models.ts index 93b2a6b6e5..110d6b34a0 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/analogue-gauge.models.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/analogue-gauge.models.ts @@ -107,7 +107,9 @@ export abstract class TbBaseGauge { } resize() { - this.gauge.update({width: this.ctx.width, height: this.ctx.height} as GenericOptions); + if (this.ctx.width > 0 && this.ctx.height > 0) { + this.gauge.update({width: this.ctx.width, height: this.ctx.height} as GenericOptions); + } } destroy() {