diff options
| author | pliablepixels <pliablepixels@gmail.com> | 2016-02-17 04:34:28 -0500 |
|---|---|---|
| committer | pliablepixels <pliablepixels@gmail.com> | 2016-02-17 04:34:28 -0500 |
| commit | 6d3f748a066f5e70abef2459b1319d46d7b40a4b (patch) | |
| tree | e3ad9a3a6d388de0ed9abdb719517080c49a69ed /www | |
| parent | 1b822c97b9d4c4f6588429ff06e0804d38177fef (diff) | |
#162 - desktops get a + and - button to zoom. You can drag the mouse to pan
Former-commit-id: 345cf85653b15358cf3776f7216ff3af84700c23
Diffstat (limited to 'www')
| -rw-r--r-- | www/css/style.css | 9 | ||||
| -rw-r--r-- | www/js/ModalCtrl.js | 16 | ||||
| -rw-r--r-- | www/templates/monitors-modal.html | 6 |
3 files changed, 30 insertions, 1 deletions
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 @@ <span class="camera-icon"> <a class="button icon ion-ios-camera button-positive" href="" ng-click="saveImageToPhone(monitorId)"></a> </span> + + <span ng-if="$root.platformOS == 'desktop'" class="desktop-zoom-icon"> + <a class="button icon ion-plus-round button-assertive" href="" ng-click="zoomImage(1)"></a> + <a class="button icon ion-minus-round button-assertive" href="" ng-click="zoomImage(-1)"></a> + + </span> <span class="modal-alarm-badge"> <a data-badge="{{$root.alarmCount}}" class="animated infinite tada button icon ion-ios-bell notification-badge button-assertive" |
