Skip to content

Commit

Permalink
Fix enabling and disabling animations
Browse files Browse the repository at this point in the history
  • Loading branch information
coufalja committed Feb 18, 2019
1 parent 2f52aa3 commit 88a0857
Showing 1 changed file with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions res/app/control-panes/dashboard/shell/shell-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,39 @@ module.exports = function ShellCtrl($scope) {
}

$scope.disableAnimations = function() {
$scope.control.shell('settings put global window_animation_scale 0')
$scope.control.shell('settings put global transition_animation_scale 0')
$scope.control.shell('settings put global animator_duration_scale 0')
$scope.$digest()
$scope.control.shell('settings put global window_animation_scale 0').then(function(result) {
$scope.result = result
$scope.data = result.data.join('')
$scope.$digest()
return $scope.control.shell('settings put global transition_animation_scale 0')
}).then(function(result) {
$scope.result = result
$scope.data = result.data.join('')
$scope.$digest()
return $scope.control.shell('settings put global animator_duration_scale 0')
}).then(function(result) {
$scope.result = result
$scope.data = 'Animations disabled'
$scope.$digest()
})
}

$scope.enableAnimations = function() {
$scope.control.shell('settings put global window_animation_scale 1')
$scope.control.shell('settings put global transition_animation_scale 1')
$scope.control.shell('settings put global animator_duration_scale 1')
$scope.$digest()
$scope.control.shell('settings put global window_animation_scale 1').then(function(result) {
$scope.result = result
$scope.data = result.data.join('')
$scope.$digest()
return $scope.control.shell('settings put global transition_animation_scale 1')
}).then(function(result) {
$scope.result = result
$scope.data = result.data.join('')
$scope.$digest()
return $scope.control.shell('settings put global animator_duration_scale 1')
}).then(function(result) {
$scope.result = result
$scope.data = 'Animations enabled'
$scope.$digest()
})
}
// WANDERA CUSTOM - END

Expand Down

0 comments on commit 88a0857

Please sign in to comment.