Commit b761dcde by Torkel Ödegaard

Switch from watch to watchCollection for bodyclass directive

parent b6cdb0f8
...@@ -15,7 +15,7 @@ function (angular, app, _) { ...@@ -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, _) { ...@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment