Repeat panels when row is expanding (#10679)

* fix: repeat panels when row is expanding

* repeat panel: change test name to more clear one
This commit is contained in:
Alexander Zobnin
2018-01-31 16:13:47 +03:00
committed by Torkel Ödegaard
parent 1cfc81de74
commit 56c526fad3
2 changed files with 60 additions and 0 deletions

View File

@@ -569,6 +569,7 @@ export class DashboardModel {
if (row.collapsed) {
row.collapsed = false;
let hasRepeat = false;
if (row.panels.length > 0) {
// Use first panel to figure out if it was moved or pushed
@@ -589,6 +590,10 @@ export class DashboardModel {
// update insert post and y max
insertPos += 1;
yMax = Math.max(yMax, panel.gridPos.y + panel.gridPos.h);
if (panel.repeat) {
hasRepeat = true;
}
}
const pushDownAmount = yMax - row.gridPos.y;
@@ -599,6 +604,10 @@ export class DashboardModel {
}
row.panels = [];
if (hasRepeat) {
this.processRepeats();
}
}
// sort panels