mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
small refactoring of check if other panel is in fullscreen edit/view mode
This commit is contained in:
parent
73c5883f0d
commit
df54c17dca
@ -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, _) {
|
|||||||
// 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) {
|
|||||||
$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);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user