From 338a37abc8d2dd59d2c470cd7bffe67c31f4caf0 Mon Sep 17 00:00:00 2001 From: Tobias Skarhed Date: Thu, 2 Aug 2018 15:06:41 +0200 Subject: [PATCH] Replace floor with round --- public/app/features/dashboard/dashboard_ctrl.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/features/dashboard/dashboard_ctrl.ts b/public/app/features/dashboard/dashboard_ctrl.ts index 51a42ab0b0a..bdd6d7050c5 100644 --- a/public/app/features/dashboard/dashboard_ctrl.ts +++ b/public/app/features/dashboard/dashboard_ctrl.ts @@ -82,8 +82,8 @@ export class DashboardCtrl implements PanelContainer { this.dashboard.panels.forEach((panel, i) => { console.log(i); console.log(panel.gridPos); - panel.gridPos.y = Math.floor(panel.gridPos.y / scaleFactor) || 1; - panel.gridPos.h = Math.floor(panel.gridPos.h / scaleFactor) || 1; + panel.gridPos.y = Math.round(panel.gridPos.y / scaleFactor) || 1; + panel.gridPos.h = Math.round(panel.gridPos.h / scaleFactor) || 1; console.log(panel.gridPos); });