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 | |
| parent | f3b29a2457c069230d6b7ecc17df715ece42c5a0 (diff) | |
allow for images to go beyond height if in landscape
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/EventCtrl.js | 24 | ||||
| -rw-r--r-- | www/templates/events.html | 2 |
2 files changed, 21 insertions, 5 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') { diff --git a/www/templates/events.html b/www/templates/events.html index 1a964f6c..744474b0 100644 --- a/www/templates/events.html +++ b/www/templates/events.html @@ -98,7 +98,7 @@ <!-- <br/> Default video:{{event.Event.relativePath}}{{event.Event.DefaultVideo}}--> </div> </div> <!-- col--> - <div class="col"> + <div ng-if="loginData.eventViewThumbs!='none'" class="col"> <div ng-if="loginData.eventViewThumbs!='none'" ng-class="::{'largeThumbs': thumbClass=='large', 'smallThumbs': thumbClass=='small'}"> <img bg-color="#6C7A89" ng-src="{{constructThumbnail(event)}}" |
