Switch from watch to watchCollection for bodyclass directive
This commit is contained in:
@@ -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, _) {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user