summaryrefslogtreecommitdiff
path: root/www/js/MontageCtrl.js
diff options
context:
space:
mode:
authorPliablePixels <pliablepixels@gmail.com>2015-07-14 16:02:57 -0400
committerPliablePixels <pliablepixels@gmail.com>2015-07-14 16:02:57 -0400
commit79d2427d6d44df8cf20907420eccf87c06b821d9 (patch)
treecda8d1ce27c0933df15ccdb19a892bba31970808 /www/js/MontageCtrl.js
parent95d3bed1b71c7801981a9c78454adfa8fadbd486 (diff)
Feed screens now have a grey background, also have ability to scale images to crop or fit
Diffstat (limited to 'www/js/MontageCtrl.js')
-rw-r--r--www/js/MontageCtrl.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index 94ec78ab..20843a94 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -17,6 +17,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
$scope.minimal = $stateParams.minimal;
$scope.isRefresh = $stateParams.isRefresh;
var sizeInProgress = false;
+ $scope.imageStyle = true;
$ionicSideMenuDelegate.canDragContent(false);
@@ -70,8 +71,8 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
console.log("Montage order is " + myorder);
console.log("Hidden order is " + myhiddenorder);
- montageOrder = myorder.split(",");
- hiddenOrder = myhiddenorder.split(",");
+ if (myorder) montageOrder = myorder.split(",");
+ if (myhiddenorder) hiddenOrder = myhiddenorder.split(",");
} // at this stage, the monitor arrangement is not matching
// the montage order. Its in true order. Let us first process the hiddenOrder part
@@ -158,7 +159,6 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
this.loadNotifications = function () {
// randomval is appended to img src, so after each interval the image reloads
$scope.randomval = (new Date()).getTime();
- //console.log ("**** NOTIFICATION with rand="+$scope.randomval+"*****");
};
var intervalHandle = $interval(function () {
@@ -377,7 +377,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
// in montage view
$scope.monitorId = mid;
$scope.LoginData = ZMDataModel.getLogin();
- $scope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111;
+ $rootScope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111;
$scope.ptzMoveCommand = "";
// This is a modal to show the monitor footage
@@ -607,5 +607,11 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
};
+ $scope.scaleImage = function() {
+ console.log ("Switching image style");
+ $scope.imageStyle = !$scope.imageStyle;
+
+ };
+
}]);