Commit 338a37ab by Tobias Skarhed Committed by Torkel Ödegaard

Replace floor with round

parent 9e4748e2
...@@ -82,8 +82,8 @@ export class DashboardCtrl implements PanelContainer { ...@@ -82,8 +82,8 @@ export class DashboardCtrl implements PanelContainer {
this.dashboard.panels.forEach((panel, i) => { this.dashboard.panels.forEach((panel, i) => {
console.log(i); console.log(i);
console.log(panel.gridPos); console.log(panel.gridPos);
panel.gridPos.y = Math.floor(panel.gridPos.y / scaleFactor) || 1; panel.gridPos.y = Math.round(panel.gridPos.y / scaleFactor) || 1;
panel.gridPos.h = Math.floor(panel.gridPos.h / scaleFactor) || 1; panel.gridPos.h = Math.round(panel.gridPos.h / scaleFactor) || 1;
console.log(panel.gridPos); console.log(panel.gridPos);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment