From 4219ed075f4c3ad56c22c49371406b8c09302e3e Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Fri, 22 Nov 2024 16:29:29 +0200 Subject: [PATCH 1/2] UI: Fixed add small widget in mobile layout dashboard --- .../src/app/modules/home/models/dashboard-component.models.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts b/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts index b4132bf882..1f8c4c91f7 100644 --- a/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts +++ b/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts @@ -761,7 +761,8 @@ export class DashboardWidget implements GridsterItem, IDashboardWidget { } else { res = this.sizeY; } - return Math.floor(res); + res = Math.floor(res); + return res === 0 ? 1 : res; } set rows(rows: number) { From 5916f3114317874b066731b48c93d181703566e7 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Mon, 25 Nov 2024 13:56:30 +0200 Subject: [PATCH 2/2] UI: Refactoring calc row in DashboardWidget --- .../src/app/modules/home/models/dashboard-component.models.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts b/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts index 1f8c4c91f7..6658f0b8a4 100644 --- a/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts +++ b/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts @@ -761,8 +761,7 @@ export class DashboardWidget implements GridsterItem, IDashboardWidget { } else { res = this.sizeY; } - res = Math.floor(res); - return res === 0 ? 1 : res; + return Math.max(Math.floor(res), 1); } set rows(rows: number) {