migrate minSpan (#10924)

This commit is contained in:
Mitsuhiro Tanda
2018-02-16 17:29:10 +09:00
committed by Torkel Ödegaard
parent 244ae555d9
commit 3b04efa4c0
2 changed files with 11 additions and 0 deletions

View File

@@ -429,6 +429,9 @@ export class DashboardMigrator {
for (let panel of row.panels) {
panel.span = panel.span || DEFAULT_PANEL_SPAN;
if (panel.minSpan) {
panel.minSpan = Math.min(GRID_COLUMN_COUNT, GRID_COLUMN_COUNT / 12 * panel.minSpan);
}
const panelWidth = Math.floor(panel.span) * widthFactor;
const panelHeight = panel.height ? getGridHeight(panel.height) : rowGridHeight;