Commit d81d2f00 by Torkel Ödegaard

fixed issue with panel size when going into edit mode

parent 8130067f
......@@ -95,7 +95,7 @@ export class PanelModel {
setViewMode(fullscreen: boolean, isEditing: boolean) {
this.fullscreen = fullscreen;
this.isEditing = isEditing;
this.events.emit('panel-size-changed');
this.events.emit('view-mode-changed');
}
updateGridPos(newPos: GridPos) {
......
......@@ -140,6 +140,19 @@ module.directive('grafanaPanel', ($rootScope, $document, $timeout) => {
});
});
ctrl.events.on('view-mode-changed', () => {
// first wait one pass for dashboard fullscreen view mode to take effect (classses being applied)
setTimeout(() => {
// then recalc style
ctrl.calculatePanelHeight();
// then wait another cycle (this might not be needed)
$timeout(() => {
ctrl.render();
resizeScrollableContent();
});
});
});
// set initial height
ctrl.calculatePanelHeight();
......
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