Przeglądaj źródła

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

Torkel Ödegaard 9 lat temu
rodzic
commit
25a5fc465c
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      public/app/features/dashboard/row/row_ctrl.ts

+ 1 - 1
public/app/features/dashboard/row/row_ctrl.ts

@@ -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);