summaryrefslogtreecommitdiff
path: root/www/js/EventCtrl.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2020-09-06 15:05:44 -0400
committerPliable Pixels <pliablepixels@gmail.com>2020-09-06 15:05:44 -0400
commit8585728630a2203c9305678fc690d65b93b62a3d (patch)
tree9cd2b64134cc0a8e59c7f8dec6208f9d36482cd4 /www/js/EventCtrl.js
parent53fdf34c02db5ad4d6b7b249e601da967c55ed0c (diff)
#963 2 col format for small, 1 col for large
Diffstat (limited to 'www/js/EventCtrl.js')
-rw-r--r--www/js/EventCtrl.js23
1 files changed, 12 insertions, 11 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js
index d5ec228d..acb01b3e 100644
--- a/www/js/EventCtrl.js
+++ b/www/js/EventCtrl.js
@@ -78,7 +78,12 @@ angular.module('zmApp.controllers')
//---------------------------------------------------
-
+ $scope.$on('sizechanged', function() {
+ $timeout (function () {
+ recomputeThumbSize();
+ },10);
+
+ });
//we come here is TZ is updated after the view loads
var tzu = $scope.$on('tz-updated', function () {
@@ -95,7 +100,6 @@ angular.module('zmApp.controllers')
$scope.$on('$ionicView.afterEnter', function () {
- window.addEventListener("resize", recomputeThumbSize, false);
$ionicListDelegate.canSwipeItems(true);
// NVR.debug("enabling options swipe");
@@ -192,17 +196,13 @@ angular.module('zmApp.controllers')
$scope.$on('$ionicView.beforeEnter', function () {
- //console.log ("********* BEFORE ENTER");
- //
-
-
var ld = NVR.getLogin();
if (ld.eventViewThumbsSize == 'large') {
NVR.debug ('Switching to big thumbs style');
$scope.thumbClass = 'large';
$scope.rowHeightRegular = 450;
- $scope.rowHeightExpanded = $scope.rowHeightRegular + 200;
+ $scope.rowHeightExpanded = $scope.rowHeightRegular + 230;
} else {
NVR.debug ('using small thumbs style');
$scope.thumbClass = 'small';
@@ -3003,17 +3003,18 @@ angular.module('zmApp.controllers')
}
var ld = NVR.getLogin();
var landscape = ($rootScope.devWidth > $rootScope.devHeight) ? true:false;
-
- var maxRowHeight = $scope.rowHeight - 120;
+ var maxRowHeight;
if (ld.eventViewThumbsSize == 'large') {
+ maxRowHeight = $scope.rowHeight - 170;
if (landscape) {
- return calculateAspectRatioFit(mw, mh, 0.7* $rootScope.devWidth, maxRowHeight);
+ return calculateAspectRatioFit(mw, mh, 0.9* $rootScope.devWidth, maxRowHeight);
} else {
- return calculateAspectRatioFit(mw, mh, 0.4* $rootScope.devWidth, maxRowHeight);
+ return calculateAspectRatioFit(mw, mh, 0.8* $rootScope.devWidth, maxRowHeight);
}
} else { // small
+ maxRowHeight = $scope.rowHeight - 150;
if (landscape) {
return calculateAspectRatioFit(mw, mh, 0.5* $rootScope.devWidth, maxRowHeight);