From 6d3f748a066f5e70abef2459b1319d46d7b40a4b Mon Sep 17 00:00:00 2001 From: pliablepixels Date: Wed, 17 Feb 2016 04:34:28 -0500 Subject: #162 - desktops get a + and - button to zoom. You can drag the mouse to pan Former-commit-id: 345cf85653b15358cf3776f7216ff3af84700c23 --- www/css/style.css | 9 +++++++++ www/js/ModalCtrl.js | 16 +++++++++++++++- www/templates/monitors-modal.html | 6 ++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/www/css/style.css b/www/css/style.css index 384304b3..2a9e9098 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -302,6 +302,15 @@ http://www.cssportal.com/tryit/index.php?file=blog/css-notification-badge */ opacity:0.7; } +.desktop-zoom-icon +{ + position:absolute; + bottom:20px; + left:70px; + z-index:10; + opacity:0.7; +} + .modal-alarm-badge { position:absolute; diff --git a/www/js/ModalCtrl.js b/www/js/ModalCtrl.js index a4a75807..1deffdbb 100644 --- a/www/js/ModalCtrl.js +++ b/www/js/ModalCtrl.js @@ -1121,7 +1121,21 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco } - + $scope.zoomImage = function (val) + { + var zl = parseInt($ionicScrollDelegate.$getByHandle("imgscroll").getScrollPosition().zoom); + if (zl == 1 && val == -1) + { + ZMDataModel.zmDebug ("Already zoomed out max"); + return; + } + + + zl+=val; + ZMDataModel.zmDebug ("Zoom level is " + zl); $ionicScrollDelegate.$getByHandle("imgscroll").zoomTo(zl,true); + + }; + //-------------------------------------------------------- //Navigate to next/prev event in full screen mode diff --git a/www/templates/monitors-modal.html b/www/templates/monitors-modal.html index f035f6cd..cadd856c 100644 --- a/www/templates/monitors-modal.html +++ b/www/templates/monitors-modal.html @@ -83,6 +83,12 @@ + + + + + +