From 99154f9d7ed03e8f818c56055591cdb3774f669d Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sat, 5 Sep 2020 20:01:43 -0400 Subject: allow for images to go beyond height if in landscape --- www/js/EventCtrl.js | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'www/js/EventCtrl.js') 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') { -- cgit v1.2.3