mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Switch from watch to watchCollection for bodyclass directive
This commit is contained in:
parent
b6cdb0f885
commit
b761dcde45
@ -15,7 +15,7 @@ function (angular, app, _) {
|
|||||||
var lastPulldownVal;
|
var lastPulldownVal;
|
||||||
var lastHideControlsVal;
|
var lastHideControlsVal;
|
||||||
|
|
||||||
$scope.$watch('dashboard.pulldowns', function() {
|
$scope.$watchCollection('dashboard.pulldowns', function() {
|
||||||
if (!$scope.dashboard) {
|
if (!$scope.dashboard) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -26,7 +26,7 @@ function (angular, app, _) {
|
|||||||
elem.toggleClass('submenu-controls-visible', panelEnabled);
|
elem.toggleClass('submenu-controls-visible', panelEnabled);
|
||||||
lastPulldownVal = panelEnabled;
|
lastPulldownVal = panelEnabled;
|
||||||
}
|
}
|
||||||
}, true);
|
});
|
||||||
|
|
||||||
$scope.$watch('dashboard.hideControls', function() {
|
$scope.$watch('dashboard.hideControls', function() {
|
||||||
if (!$scope.dashboard) {
|
if (!$scope.dashboard) {
|
||||||
@ -49,4 +49,4 @@ function (angular, app, _) {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user