fix(ux dashboard): panel height fix to reduce jumpiness when loading dashboard
This commit is contained in:
@@ -74,6 +74,14 @@ module.directive('grafanaPanel', function($rootScope) {
|
||||
var hasAlertRule;
|
||||
var lastHeight = 0;
|
||||
|
||||
// set initial height
|
||||
if (!ctrl.containerHeight) {
|
||||
console.log('setting initial height');
|
||||
ctrl.calculatePanelHeight();
|
||||
panelContainer.css({minHeight: ctrl.containerHeight});
|
||||
lastHeight = ctrl.containerHeight;
|
||||
}
|
||||
|
||||
ctrl.events.on('render', () => {
|
||||
if (lastHeight !== ctrl.containerHeight) {
|
||||
panelContainer.css({minHeight: ctrl.containerHeight});
|
||||
|
||||
Reference in New Issue
Block a user