GUACAMOLE-152: Handle zoom changes with autoFit correctly.

This commit is contained in:
Nick Couchman
2018-05-12 08:13:15 -04:00
parent b4c8bc8058
commit b34d97f82d
3 changed files with 19 additions and 2 deletions

View File

@@ -26,7 +26,13 @@ angular.module('client').directive('guacZoomCtrl', function guacZoomCtrl() {
restrict: 'A',
require: 'ngModel',
priority: 101,
link: function(scope, element, attr, ngModel) {
link: function(scope, element, attrs, ngModel) {
// Evaluate the ngChange attribute when the model
// changes.
ngModel.$viewChangeListeners.push(function() {
scope.$eval(attrs.ngChange);
});
// When pushing to the menu, mutiply by 100.
ngModel.$formatters.push(function(value) {