summaryrefslogtreecommitdiff
path: root/www/js/MontageCtrl.js
diff options
context:
space:
mode:
authorpliablepixels <pliablepixels@gmail.com>2016-04-15 11:54:13 -0400
committerpliablepixels <pliablepixels@gmail.com>2016-04-15 11:54:13 -0400
commit8fccabcec0f0d0d13ae1bc6b9032f15cfe621914 (patch)
tree5dd4d283de41fb1511ce3aa5e64ba314769a6d0d /www/js/MontageCtrl.js
parentd20c33f7cbdc4d0e4b51d2e318616a3b5f1f7150 (diff)
#224 - initial code for zoom support
Former-commit-id: 7b81646df0bef3a3dab87868485d54aed1953b39
Diffstat (limited to 'www/js/MontageCtrl.js')
-rw-r--r--www/js/MontageCtrl.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index eb4358e5..7563da8e 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -651,7 +651,14 @@ function initPackery()
$rootScope.modalRand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111;
$scope.ptzMoveCommand = "";
$scope.ptzStopCommand = "";
+
+ $scope.zoomInCommand = "";
+ $scope.zoomOutCommand = "";
+ $scope.zoomStopCommand = "zoomStop";
+ $scope.canZoom = false;
+
$scope.presetOn = false;
+
$scope.connKey = (Math.floor((Math.random() * 999999) + 1)).toString();
// This is a modal to show the monitor footage
@@ -670,6 +677,28 @@ function initPackery()
$scope.ptzMoveCommand = "move"; // start with as move;
$scope.ptzStopCommand = "";
+
+ if (data.control.Control.CanZoom=='1')
+ {
+ $scope.canZoom = true;
+ if (data.control.Control.CanZoomCon == '1')
+ {
+ $scope.zoomInCommand = "zoomConTele";
+ $scope.zoomOutCommand = "zoomConWide";
+
+ }
+ else if (data.control.Control.CanZoomRel == '1')
+ {
+ $scope.zoomInCommand = "zoomRelTele";
+ $scope.zoomOutCommand = "zoomRelWide";
+ }
+
+ else if (data.control.Control.CanZoomAbs == '1')
+ {
+ $scope.zoomInCommand = "zoomRelAbs";
+ $scope.zoomOutCommand = "zoomRelAbs";
+ }
+ }
ZMDataModel.zmDebug("MontageCtrl: control data returned " + JSON.stringify(data));