From 95f67ed79d45f421c0b830182d0ada01e2033c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 5 Aug 2017 08:51:57 +0200 Subject: [PATCH] minor fixes --- public/app/features/dashboard/model.ts | 9 +++++++-- public/dashboards/home.json | 2 +- public/sass/components/_gridstack.scss | 3 --- public/sass/pages/_dashboard.scss | 5 ----- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/public/app/features/dashboard/model.ts b/public/app/features/dashboard/model.ts index 87b41a1db09..a999b5d0dcd 100644 --- a/public/app/features/dashboard/model.ts +++ b/public/app/features/dashboard/model.ts @@ -656,14 +656,19 @@ export class DashboardModel { height = Math.ceil(height / CELL_HEIGHT); for (let panel of row.panels) { + // should wrap to next row? + if (xPos + panel.span >= 12) { + yPos += height; + } + panel.x = xPos; panel.y = yPos; panel.width = panel.span; panel.height = height; - xPos += panel.width; - this.panels.push(panel); + + xPos += panel.width; } yPos += height; diff --git a/public/dashboards/home.json b/public/dashboards/home.json index e2eb67c5cb8..c0c7694c76d 100644 --- a/public/dashboards/home.json +++ b/public/dashboards/home.json @@ -12,7 +12,7 @@ "title": "Home Dashboard", "collapse": false, "editable": true, - "height": "25px", + "height": 150, "panels": [ { "content": "
\n Home Dashboard\n
", diff --git a/public/sass/components/_gridstack.scss b/public/sass/components/_gridstack.scss index 5ae0d9d0213..51c59b31cfb 100644 --- a/public/sass/components/_gridstack.scss +++ b/public/sass/components/_gridstack.scss @@ -23,7 +23,6 @@ right: 5px; bottom: 0; width: auto; - z-index: 0 !important; text-align: center; } @@ -41,8 +40,6 @@ right: 7px; bottom: 0; width: auto; - overflow-x: hidden; - overflow-y: auto; } .grid-stack > .grid-stack-item > .ui-resizable-handle { diff --git a/public/sass/pages/_dashboard.scss b/public/sass/pages/_dashboard.scss index c1674379b74..3b5ecdef35b 100644 --- a/public/sass/pages/_dashboard.scss +++ b/public/sass/pages/_dashboard.scss @@ -33,11 +33,6 @@ div.flot-text { } } -.panel-margin { - margin: 0 0.4rem 0.8rem 0.4rem; - //display: block; -} - .panel-container { background-color: $panel-bg; position: relative;