Merge pull request #2410 from FinnStutzenstein/projectorScale
Allow to scale the projector in the projectorcontainer greater than 100%
This commit is contained in:
commit
17ddef67f7
@ -85,24 +85,17 @@ 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
|
if (scale_width <= scale_height) {
|
||||||
$scope.scale = 1;
|
// width is the reference
|
||||||
$scope.iframeWidth = $scope.projectorWidth;
|
$scope.iframeWidth = window.innerWidth;
|
||||||
$scope.iframeHeight = $scope.projectorHeight;
|
$scope.scale = scale_width;
|
||||||
|
$scope.iframeHeight = $scope.projectorHeight * scale_width;
|
||||||
} else {
|
} else {
|
||||||
// Iframe has to be scaled down
|
// height is the reference
|
||||||
if (scale_width <= scale_height) {
|
$scope.iframeHeight = window.innerHeight;
|
||||||
// width is the reference
|
$scope.scale = scale_height;
|
||||||
$scope.iframeWidth = window.innerWidth;
|
$scope.iframeWidth = $scope.projectorWidth * scale_height;
|
||||||
$scope.scale = scale_width;
|
|
||||||
$scope.iframeHeight = $scope.projectorHeight * scale_width;
|
|
||||||
} else {
|
|
||||||
// height is the reference
|
|
||||||
$scope.iframeHeight = window.innerHeight;
|
|
||||||
$scope.scale = scale_height;
|
|
||||||
$scope.iframeWidth = $scope.projectorWidth * scale_height;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user