From 4fe05fded352c4f504072f1cb7eb0f8afd07635c Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Thu, 17 Oct 2024 10:27:10 +0300 Subject: [PATCH] UI: Fixed row and column auto calc --- .../home/components/widget/lib/scada/scada-symbol.models.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/scada/scada-symbol.models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/scada/scada-symbol.models.ts index c6be0f46d1..41611d3f6e 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/scada/scada-symbol.models.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/scada/scada-symbol.models.ts @@ -220,8 +220,8 @@ export interface ScadaSymbolMetadata { export const emptyMetadata = (width?: number, height?: number): ScadaSymbolMetadata => ({ title: '', - widgetSizeX: width ? width/100 : 3, - widgetSizeY: height ? height/100 : 3, + widgetSizeX: width ? Math.max(Math.round(width/100), 1) : 3, + widgetSizeY: height ? Math.max(Math.round(height/100), 1) : 3, tags: [], behavior: [], properties: []