Fixed breaking change in camera for android.

This commit is contained in:
Nedyalko Nikolov
2016-05-14 11:15:29 +03:00
parent a5e2d46553
commit cf3cd35a4f
5 changed files with 101 additions and 92 deletions

View File

@ -1,8 +1,8 @@
export function getAspectSafeDimensions(sourceWidth, sourceHeight, reqWidth, reqHeight) {
var widthCoef = sourceWidth / reqWidth;
var heightCoef = sourceHeight / reqHeight;
let widthCoef = sourceWidth / reqWidth;
let heightCoef = sourceHeight / reqHeight;
var aspectCoef = widthCoef > heightCoef ? widthCoef : heightCoef;
let aspectCoef = widthCoef > heightCoef ? widthCoef : heightCoef;
return {
width: Math.floor(sourceWidth / aspectCoef),