Merge pull request #2410 from FinnStutzenstein/projectorScale

Allow to scale the projector in the projectorcontainer greater than 100%
This commit is contained in:
Norman Jäckel 2016-09-22 22:01:28 +02:00 committed by GitHub
commit 17ddef67f7

View File

@ -85,13 +85,7 @@ angular.module('OpenSlidesApp.core.projector', ['OpenSlidesApp.core'])
var scale_width = window.innerWidth / $scope.projectorWidth; var scale_width = window.innerWidth / $scope.projectorWidth;
var scale_height = window.innerHeight / $scope.projectorHeight; var scale_height = window.innerHeight / $scope.projectorHeight;
if (scale_width > 1 && scale_height > 1) { // Iframe has to be scaled down or saceUp is activated
// Iframe fits in full size in the window
$scope.scale = 1;
$scope.iframeWidth = $scope.projectorWidth;
$scope.iframeHeight = $scope.projectorHeight;
} else {
// Iframe has to be scaled down
if (scale_width <= scale_height) { if (scale_width <= scale_height) {
// width is the reference // width is the reference
$scope.iframeWidth = window.innerWidth; $scope.iframeWidth = window.innerWidth;
@ -103,7 +97,6 @@ angular.module('OpenSlidesApp.core.projector', ['OpenSlidesApp.core'])
$scope.scale = scale_height; $scope.scale = scale_height;
$scope.iframeWidth = $scope.projectorWidth * scale_height; $scope.iframeWidth = $scope.projectorWidth * scale_height;
} }
}
}; };
// watch for changes in the windowsize // watch for changes in the windowsize