Commit 0120023a by Patrick O'Carroll

added forceupdate to grid item so addpanel items rezie instantly, renamed…

added forceupdate to grid item so addpanel items rezie instantly, renamed function to copyPanel, fixed panel items height issue
parent 0e0976b0
......@@ -152,11 +152,13 @@ export class DashboardGrid extends React.Component<DashboardGridProps, any> {
onResize(layout, oldItem, newItem) {
this.panelMap[newItem.i].updateGridPos(newItem);
this.triggerForceUpdate();
}
onResizeStop(layout, oldItem, newItem) {
this.updateGridPos(newItem, layout);
this.panelMap[newItem.i].resizeDone();
this.triggerForceUpdate();
}
onDragStop(layout, oldItem, newItem) {
......
......@@ -195,7 +195,7 @@ export class PanelCtrl {
menu.push({
text: 'Copy',
click: 'ctrl.addToPanelList()',
click: 'ctrl.copyPanel()',
role: 'Editor',
});
}
......@@ -260,9 +260,9 @@ export class PanelCtrl {
});
}
addToPanelList() {
copyPanel() {
store.set(LS_PANEL_COPY_KEY, JSON.stringify(this.panel.getSaveModel()));
appEvents.emit('alert-success', ['Panel temporarily added to panel list']);
appEvents.emit('alert-success', ['Panel copied. Open new panel to paste']);
}
replacePanel(newPanel, oldPanel) {
......
......@@ -50,7 +50,7 @@
flex-direction: row;
flex-wrap: wrap;
overflow: auto;
height: calc(100% - 50px);
height: 100%;
align-content: flex-start;
justify-content: space-around;
position: relative;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment