Merge pull request #15822 from grafana/copy-panel-retain-size

Keep size from copied panel
This commit is contained in:
Torkel Ödegaard 2019-03-06 17:06:19 +01:00 committed by GitHub
commit 878b41d666
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,7 +100,12 @@ export class AddPanelWidget extends React.Component<Props, State> {
const newPanel: any = {
type: panelPluginInfo.id,
title: 'Panel Title',
gridPos: { x: gridPos.x, y: gridPos.y, w: gridPos.w, h: gridPos.h },
gridPos: {
x: gridPos.x,
y: gridPos.y,
w: panelPluginInfo.defaults.gridPos.w,
h: panelPluginInfo.defaults.gridPos.h,
},
};
// apply panel template / defaults