From 3f8f80baf387bfc30f61bdda169848db54972593 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 5 Nov 2014 21:26:51 +0300 Subject: [PATCH] Fixed download photo on mobile Closes #506 --- app/js/services.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/js/services.js b/app/js/services.js index e09b35e4..adbea15e 100644 --- a/app/js/services.js +++ b/app/js/services.js @@ -2323,8 +2323,8 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) ext = 'jpg', mimeType = 'image/jpeg', fileName = 'photo' + photoID + '.' + ext, - fullWidth = $(window).width() - 36, - fullHeight = $($window).height() - 150, + fullWidth = Math.max(screen.width || 0, $(window).width() - 36, 800), + fullHeight = Math.max(screen.height || 0, $($window).height() - 150, 800), fullPhotoSize = choosePhotoSize(photo, fullWidth, fullHeight), inputFileLocation = { _: 'inputFileLocation',