mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fixed issue with panel size when going into edit mode
This commit is contained in:
parent
8130067fd1
commit
d81d2f00f6
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user