diff --git a/frontend/src/app/modules/grids/grid/area.service.ts b/frontend/src/app/modules/grids/grid/area.service.ts index e053378852..6232011901 100644 --- a/frontend/src/app/modules/grids/grid/area.service.ts +++ b/frontend/src/app/modules/grids/grid/area.service.ts @@ -49,7 +49,8 @@ export class GridAreaService { } public cleanupUnusedAreas() { - let unusedRows = Array.from(Array(this.numRows + 1).keys()).slice(1); + // array containing Numbers from this.numRows to 1 + let unusedRows = _.range(this.numRows, 0, -1); this.widgetAreas.forEach(widget => { unusedRows = unusedRows.filter(item => item !== widget.startRow); @@ -61,7 +62,7 @@ export class GridAreaService { } }); - let unusedColumns = Array.from(Array(this.numColumns + 1).keys()).slice(1); + let unusedColumns = _.range(this.numColumns, 0, -1); this.widgetAreas.forEach(widget => { unusedColumns = unusedColumns.filter(item => item !== widget.startColumn); diff --git a/frontend/src/app/modules/grids/grid/grid.component.ts b/frontend/src/app/modules/grids/grid/grid.component.ts index 65e45d8df5..c5a1a3e624 100644 --- a/frontend/src/app/modules/grids/grid/grid.component.ts +++ b/frontend/src/app/modules/grids/grid/grid.component.ts @@ -112,19 +112,10 @@ export class GridComponent implements OnDestroy, OnInit { return this.sanitization.bypassSecurityTrustStyle(style); } - // array containing Numbers from 1 to this.numColumns - public get columnNumbers() { - return Array.from(Array(this.layout.numColumns + 1).keys()).slice(1); - } - public get gridRowStyle() { return this.sanitization.bypassSecurityTrustStyle(`repeat(${this.layout.numRows}, ${this.GRID_AREA_HEIGHT})`); } - public get rowNumbers() { - return Array.from(Array(this.layout.numRows + 1).keys()).slice(1); - } - public identifyGridArea(index:number, area:GridArea) { return area.guid; } diff --git a/modules/overviews/config/locales/en.seeders.bim.yml b/modules/overviews/config/locales/en.seeders.bim.yml index 367828b443..37e93cf7a8 100644 --- a/modules/overviews/config/locales/en.seeders.bim.yml +++ b/modules/overviews/config/locales/en.seeders.bim.yml @@ -32,7 +32,7 @@ en: projects: demo-construction-project: project-overview: - row_count: 4 + row_count: 5 column_count: 2 widgets: - identifier: 'custom_text' @@ -101,7 +101,7 @@ en: queryId: '##query.id:"Milestones"' demo-planning-constructing-project: project-overview: - row_count: 4 + row_count: 5 column_count: 2 widgets: - identifier: 'custom_text' @@ -166,7 +166,7 @@ en: queryId: '##query.id:"Milestones"' demo-bim-project: project-overview: - row_count: 4 + row_count: 5 column_count: 2 widgets: - identifier: 'custom_text' diff --git a/modules/overviews/config/locales/en.seeders.standard.yml b/modules/overviews/config/locales/en.seeders.standard.yml index e541573bda..e2f847c547 100644 --- a/modules/overviews/config/locales/en.seeders.standard.yml +++ b/modules/overviews/config/locales/en.seeders.standard.yml @@ -32,7 +32,7 @@ en: projects: demo-project: project-overview: - row_count: 4 + row_count: 5 column_count: 2 widgets: - identifier: 'custom_text' @@ -97,7 +97,7 @@ en: queryId: '##query.id:"Milestones"' scrum-project: project-overview: - row_count: 4 + row_count: 5 column_count: 2 widgets: - identifier: 'custom_text'