keep size from copied panel and not from add panel widget

This commit is contained in:
Peter Holmberg
2019-03-06 13:23:11 +01:00
parent 72d5215c65
commit db2b8ea602

View File

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