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