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 lastHideControlsVal;
|
||||
|
||||
$scope.$watch('dashboard.pulldowns', function() {
|
||||
$scope.$watchCollection('dashboard.pulldowns', function() {
|
||||
if (!$scope.dashboard) {
|
||||
return;
|
||||
}
|
||||
@ -26,7 +26,7 @@ function (angular, app, _) {
|
||||
elem.toggleClass('submenu-controls-visible', panelEnabled);
|
||||
lastPulldownVal = panelEnabled;
|
||||
}
|
||||
}, true);
|
||||
});
|
||||
|
||||
$scope.$watch('dashboard.hideControls', function() {
|
||||
if (!$scope.dashboard) {
|
||||
|
Loading…
Reference in New Issue
Block a user