Merge pull request #2352 from FinnStutzenstein/Issue2349

Fixing resolving of Config for projector resolution (fixes #2349)
This commit is contained in:
Emanuel Schütze 2016-09-07 20:10:53 +02:00 committed by GitHub
commit 34f85da1d8

View File

@ -67,13 +67,15 @@ angular.module('OpenSlidesApp.core.projector', ['OpenSlidesApp.core'])
$scope.$watch(function () { $scope.$watch(function () {
return Config.lastModified(); return Config.lastModified();
}, function () { }, function () {
var conf = Config.get('projector_resolution').value;
// With multiprojector, get the resolution from Prjector.get(pk).{width; height} // With multiprojector, get the resolution from Prjector.get(pk).{width; height}
if(!last_conf || last_conf.width != conf.width || last-conf.height != conf.height) { if (typeof $scope.config === 'function') {
last_conf = conf; var conf = $scope.config('projector_resolution');
$scope.projectorWidth = conf.width; if(!last_conf || last_conf.width != conf.width || last_conf.height != conf.height) {
$scope.projectorHeight = conf.height; last_conf = conf;
$scope.recalculateIframe(); $scope.projectorWidth = conf.width;
$scope.projectorHeight = conf.height;
$scope.recalculateIframe();
}
} }
}); });