Commit b761dcde by Torkel Ödegaard

Switch from watch to watchCollection for bodyclass directive

parent b6cdb0f8
......@@ -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) {
......
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