fix(row): fixed dropping new panels onto panels, should split target panel

This commit is contained in:
Torkel Ödegaard 2016-11-29 11:36:56 -05:00
parent 360516ed41
commit 7276b00fc7

View File

@ -44,7 +44,7 @@ export class DashRowCtrl {
if (dropTarget) {
dropTarget = this.dashboard.getPanelInfoById(dropTarget.id);
// if draging new panel onto existing panel split it
if (dragObject.isNew) {
if (dragObject.panel.isNew) {
dragObject.panel.span = dropTarget.panel.span = dropTarget.panel.span/2;
// insert after
dropTarget.row.panels.splice(dropTarget.index+1, 0, dragObject.panel);