From 316924fed856d6d3be675adc3275d13b78e9330c Mon Sep 17 00:00:00 2001 From: Arjun Roychowdhury Date: Thu, 5 Nov 2015 10:59:06 -0500 Subject: swipe support added #48 #49 --- www/js/EventCtrl.js | 8 ++++++++ www/templates/events-modal.html | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 0f16ed31..a4da30dc 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -1247,6 +1247,14 @@ angular.module('zmApp.controllers') //Navigate to next/prev event in full screen mode //-------------------------------------------------------- + $scope.onSwipe = function(eid,dirn) + { + var ld = ZMDataModel.getLogin(); + if (!ld.canSwipeMonitors) return; + jumpToEvent(eid,dirn); + + }; + $scope.jumpToEvent = function (eid, dirn) { jumpToEvent(eid, dirn); diff --git a/www/templates/events-modal.html b/www/templates/events-modal.html index 54340bd3..c3fbffcf 100644 --- a/www/templates/events-modal.html +++ b/www/templates/events-modal.html @@ -15,7 +15,10 @@ + ng-class="{'zm-image-fit':imageFit==true, 'zm-image-crop':imageFit==false}" + on-swipe-left="onSwipe(nextId,1)" + on-swipe-right="onSwipe(prevId,-1)" + />
- + @@ -103,7 +103,7 @@ gapless: {{loginData.gapless?"on":"off"}} - +