From 8fccabcec0f0d0d13ae1bc6b9032f15cfe621914 Mon Sep 17 00:00:00 2001 From: pliablepixels Date: Fri, 15 Apr 2016 11:54:13 -0400 Subject: #224 - initial code for zoom support Former-commit-id: 7b81646df0bef3a3dab87868485d54aed1953b39 --- www/js/MonitorCtrl.js | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'www/js/MonitorCtrl.js') diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js index 013c9e79..2c918fb7 100644 --- a/www/js/MonitorCtrl.js +++ b/www/js/MonitorCtrl.js @@ -302,7 +302,10 @@ angular.module('zmApp.controllers') $scope.ptzMoveCommand = ""; $scope.presetOn = false; - + $scope.zoomInCommand = ""; + $scope.zoomOutCommand = ""; + $scope.zoomStopCommand = "zoomStop"; + $scope.canZoom = false; // This is a modal to show the monitor footage @@ -321,6 +324,28 @@ angular.module('zmApp.controllers') $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 ("control PTZ details are " + JSON.stringify(data)); -- cgit v1.2.3