OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
have a fixed height for grid gaps to avoid empty space
ulferts56548e7838e4
diff --git a/frontend/src/app/modules/grids/grid/grid.component.ts b/frontend/src/app/modules/grids/grid/grid.component.tsindex c5a1a3e6241..e6324a85784 100644--- a/frontend/src/app/modules/grids/grid/grid.component.ts+++ b/frontend/src/app/modules/grids/grid/grid.component.ts@@ -42,6 +42,7 @@ export const GRID_PROVIDERS = [export class GridComponent implements OnDestroy, OnInit {public uiWidgets:ComponentRef<any>[] = [];public GRID_AREA_HEIGHT = 'auto';+ public GRID_GAP_DIMENSION = '20px';public component = WidgetWpGraphComponent;@@ -102,18 +103,13 @@ export class GridComponent implements OnDestroy, OnInit {}public get gridColumnStyle() {- let style = '';- for (let i = 0; i < this.layout.numColumns; i++) {- style += `20px calc((100% - 20px * ${this.layout.numColumns + 1}) / ${this.layout.numColumns}) `;- }-- style += '20px';-- return this.sanitization.bypassSecurityTrustStyle(style);+ return this.gridStyle(this.layout.numColumns,+ `calc((100% - ${this.GRID_GAP_DIMENSION} * ${this.layout.numColumns + 1}) / ${this.layout.numColumns})`)}public get gridRowStyle() {- return this.sanitization.bypassSecurityTrustStyle(`repeat(${this.layout.numRows}, ${this.GRID_AREA_HEIGHT})`);+ return this.gridStyle(this.layout.numRows,+ this.GRID_AREA_HEIGHT);}public identifyGridArea(index:number, area:GridArea) {@@ -123,4 +119,15 @@ export class GridComponent implements OnDestroy, OnInit {public get isHeadersDisplayed() {return this.layout.isEditable;}++ private gridStyle(amount:number, itemStyle:string) {+ let style = '';+ for (let i = 0; i < amount; i++) {+ style += `${this.GRID_GAP_DIMENSION} ${itemStyle} `;+ }++ style += `${this.GRID_GAP_DIMENSION}`;++ return this.sanitization.bypassSecurityTrustStyle(style);+ }}