diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2020-09-05 20:01:43 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2020-09-05 20:01:43 -0400 |
| commit | 99154f9d7ed03e8f818c56055591cdb3774f669d (patch) | |
| tree | 70240e4520ae4bf840110252f2376e458ceabef4 /www/js | |
| parent | f3b29a2457c069230d6b7ecc17df715ece42c5a0 (diff) | |
allow for images to go beyond height if in landscape
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/EventCtrl.js | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 0cc99651..b37b5f92 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -2976,13 +2976,29 @@ angular.module('zmApp.controllers') mh = tmp; } var ld = NVR.getLogin(); - if (ld.eventViewThumbsSize == 'large') { - return calculateAspectRatioFit(mw, mh, 0.9* $rootScope.devWidth, 0.4 * $rootScope.devHeight); + // landscape + if ($rootScope.devWidth > $rootScope.devHeight) { + + if (ld.eventViewThumbsSize == 'large') { + return calculateAspectRatioFit(mw, mh, 0.9* $rootScope.devWidth, 1.5 * $rootScope.devHeight); + + } else { + return calculateAspectRatioFit(mw, mh, 0.5 * $rootScope.devWidth, 0.7 * $rootScope.devHeight); + + } } else { - return calculateAspectRatioFit(mw, mh, 0.3 * $rootScope.devWidth, 0.3 * $rootScope.devHeight); + // portrait + if (ld.eventViewThumbsSize == 'large') { + return calculateAspectRatioFit(mw, mh, 0.9* $rootScope.devWidth, 0.4 * $rootScope.devHeight); + + } else { + return calculateAspectRatioFit(mw, mh, 0.3 * $rootScope.devWidth, 0.3 * $rootScope.devHeight); + + } - } + } + /* if (ld.eventViewThumbsSize == 'large') { |
