mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(row): fixed dropping new panels onto panels, should split target panel
This commit is contained in:
@@ -44,7 +44,7 @@ export class DashRowCtrl {
|
|||||||
if (dropTarget) {
|
if (dropTarget) {
|
||||||
dropTarget = this.dashboard.getPanelInfoById(dropTarget.id);
|
dropTarget = this.dashboard.getPanelInfoById(dropTarget.id);
|
||||||
// if draging new panel onto existing panel split it
|
// 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;
|
dragObject.panel.span = dropTarget.panel.span = dropTarget.panel.span/2;
|
||||||
// insert after
|
// insert after
|
||||||
dropTarget.row.panels.splice(dropTarget.index+1, 0, dragObject.panel);
|
dropTarget.row.panels.splice(dropTarget.index+1, 0, dragObject.panel);
|
||||||
|
|||||||
Reference in New Issue
Block a user