Commit df54c17d by Torkel Ödegaard

small refactoring of check if other panel is in fullscreen edit/view mode

parent 73c5883f
...@@ -19,9 +19,7 @@ function (angular, $, kbn, moment, _) { ...@@ -19,9 +19,7 @@ function (angular, $, kbn, moment, _) {
var hiddenData = {}; var hiddenData = {};
scope.$on('refresh',function() { scope.$on('refresh',function() {
if ($rootScope.fullscreen && !scope.fullscreen) { if (scope.otherPanelInFullscreenMode()) { return; }
return;
}
scope.get_data(); scope.get_data();
}); });
...@@ -58,11 +56,7 @@ function (angular, $, kbn, moment, _) { ...@@ -58,11 +56,7 @@ function (angular, $, kbn, moment, _) {
// Function for rendering panel // Function for rendering panel
function render_panel() { function render_panel() {
if (!data) { return; } if (!data) { return; }
if (scope.otherPanelInFullscreenMode()) { return; }
if ($rootScope.fullscreen && !scope.fullscreen) {
return;
}
if (!setElementHeight()) { return; } if (!setElementHeight()) { return; }
if (_.isString(data)) { if (_.isString(data)) {
......
...@@ -370,6 +370,10 @@ function (angular, app, $, _, kbn, moment, timeSeries) { ...@@ -370,6 +370,10 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
$scope.enterFullscreenMode({edit: true}); $scope.enterFullscreenMode({edit: true});
}; };
$scope.otherPanelInFullscreenMode = function() {
return $rootScope.fullscreen && !$scope.fullscreen;
};
$scope.render = function(data) { $scope.render = function(data) {
$scope.$emit('render', data); $scope.$emit('render', data);
}; };
......
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