From e71e9c7ce960ec95edd4af5783a62efb14fc1607 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sat, 5 Sep 2020 09:31:45 -0400 Subject: #963 allow size selection of thumbs --- www/js/EventCtrl.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'www/js/EventCtrl.js') diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index d7dd4fc1..a83f6b1e 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -195,6 +195,14 @@ angular.module('zmApp.controllers') //console.log ("********* BEFORE ENTER"); // + $scope.thumbClass = 'small'; + var ld = NVR.getLogin(); + if (ld.eventViewThumbsSize == 'large') { + NVR.debug ('Switching to big thumbs style'); + $scope.thumbClass = 'large'; + } else { + NVR.debug ('using small thumbs style'); + } $scope.mid = ''; $scope.$on ("alarm", function() { @@ -2955,8 +2963,18 @@ angular.module('zmApp.controllers') function computeThumbnailSize(mw, mh, mo) { - tw = Math.round(0.9 * $rootScope.devWidth); - th = Math.round(0.7 * $rootScope.devHeight); + var ld = NVR.getLogin(); + + if (ld.eventViewThumbsSize == 'large') { + tw = Math.round(0.9 * $rootScope.devWidth); + th = Math.round(0.7 * $rootScope.devHeight); + } else { + tw = Math.round(0.4 * $rootScope.devWidth); + th = Math.round(0.3 * $rootScope.devHeight); + } + + + var ratio = mw / mh; var result = { -- cgit v1.2.3