fix(iframe): fixed issue with using full height of iframe, fixes #5605

This commit is contained in:
Torkel Ödegaard 2016-07-18 15:41:06 +02:00
parent f3db2fa262
commit b9a2546a10
2 changed files with 13 additions and 11 deletions

View File

@ -107,9 +107,12 @@ function (angular, _, $) {
this.dashboard.meta.fullscreen = this.state.fullscreen;
if (!this.state.fullscreen) {
this.state.panelId = null;
this.state.fullscreen = null;
this.state.edit = null;
// clear panel id unless in solo mode
if (!this.dashboard.meta.soloMode) {
this.state.panelId = null;
}
}
$location.search(this.serializeToUrl());
@ -193,6 +196,7 @@ function (angular, _, $) {
var self = this;
self.panelScopes.push(panelScope);
if (!self.dashboard.meta.soloMode) {
if (self.state.panelId === panelScope.ctrl.panel.id) {
if (self.state.edit) {
panelScope.ctrl.editPanel();
@ -200,6 +204,7 @@ function (angular, _, $) {
panelScope.ctrl.viewPanel();
}
}
}
panelScope.$on('$destroy', function() {
self.panelScopes = _.without(self.panelScopes, panelScope);

View File

@ -17,15 +17,12 @@ function (angular, $) {
var params = $location.search();
panelId = parseInt(params.panelId);
// add fullscreen param;
params.fullscreen = true;
$location.search(params);
$scope.onAppEvent("dashboard-initialized", $scope.initPanelScope);
dashboardLoaderSrv.loadDashboard($routeParams.type, $routeParams.slug).then(function(result) {
result.meta.soloMode = true;
$scope.initDashboard(result, $scope);
});
$scope.onAppEvent("dashboard-initialized", $scope.initPanelScope);
};
$scope.initPanelScope = function() {