diff --git a/src/app/directives/grafanaGraph.js b/src/app/directives/grafanaGraph.js index 2069f2aa07e..b2f4296dc69 100644 --- a/src/app/directives/grafanaGraph.js +++ b/src/app/directives/grafanaGraph.js @@ -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)) { diff --git a/src/app/panels/graphite/module.js b/src/app/panels/graphite/module.js index 8298e57d04c..20a34b22ea1 100644 --- a/src/app/panels/graphite/module.js +++ b/src/app/panels/graphite/module.js @@ -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); };