summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorArjun Roychowdhury <pliablepixels@gmail.com>2015-12-06 17:23:02 -0500
committerArjun Roychowdhury <pliablepixels@gmail.com>2015-12-06 17:23:02 -0500
commit65cb2f860470f8303c341201dc892e289597507b (patch)
treee5fa83651f9cfbc205679ce059a126587affe6b5 /www/js
parent8fff74273ef27a98c04fb73139a90cf017bf0be6 (diff)
#106 - first step towards a lot of required cleanup - still very very messy
Former-commit-id: 340545e91b29552f68cb03398401668ef479d3de
Diffstat (limited to 'www/js')
-rw-r--r--www/js/EventCtrl.js3
-rw-r--r--www/js/ModalCtrl.js38
2 files changed, 33 insertions, 8 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js
index d0f42975..5102c321 100644
--- a/www/js/EventCtrl.js
+++ b/www/js/EventCtrl.js
@@ -660,6 +660,7 @@ angular.module('zmApp.controllers')
{
ZMDataModel.zmDebug("EventCtrl: Scrubbing will turn on now");
$scope.currentEvent = "";
+ $scope.event = event;
//$ionicScrollDelegate.freezeScroll(true);
$ionicSideMenuDelegate.canDragContent(false);
$scope.slider_options = {
@@ -1204,7 +1205,7 @@ angular.module('zmApp.controllers')
$scope.openModal = function (event) {
//ZMDataModel.zmDebug("EventCtrl: Open Modal with Base path " + relativepath);
-
+ $scope.event = event;
ZMDataModel.setAwake(ZMDataModel.getKeepAwake());
$scope.currentEvent = event;
diff --git a/www/js/ModalCtrl.js b/www/js/ModalCtrl.js
index 6a8a9ccf..c9ed3f88 100644
--- a/www/js/ModalCtrl.js
+++ b/www/js/ModalCtrl.js
@@ -4,7 +4,7 @@
/* global saveAs, cordova,StatusBar,angular,console,ionic, moment */
-angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootScope', 'zm', 'ZMDataModel', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$q', '$sce',function ($scope, $rootScope, zm, ZMDataModel, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, $q, $sce) {
+angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootScope', 'zm', 'ZMDataModel', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$q', '$sce', 'stopOrPlay', function ($scope, $rootScope, zm, ZMDataModel, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, $q, $sce, stopOrPlay) {
// from parent scope
@@ -994,22 +994,46 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
if (typeof $scope.ionRange !== 'undefined')
{
$scope.$watch('ionRange.index', function () {
- // console.log ("***ION RANGE CHANGED");
-
+ //
+ if (stopOrPlay.get() == true)
+ return;
$scope.mycarousel.index = parseInt($scope.ionRange.index) - 1;
+ console.log ("***ION RANGE CHANGED TO " + $scope.mycarousel.index);
});
}
if (typeof $scope.mycarousel !== 'undefined')
{
$scope.$watch('mycarousel.index', function () {
-
- $scope.ionRange.index = ($scope.mycarousel.index + 1).toString();
-
+
+ console.log ("***ION MYCAROUSEL CHANGED");
+
if (currentEvent && $scope.ionRange.index == parseInt(currentEvent.Event.Frames))
+ {
+ playbackFinished();
+ }
+ // end of playback from quick scrub
+ // so ignore gapless
+
+
+
+ if ($scope.event && $scope.ionRange.index == parseInt($scope.event.Event.Frames)-1 )
{
- playbackFinished();
+ if (!$scope.modal || $scope.modal.isShown()==false)
+ {
+ console.log ("quick scrub playback over");
+ stopOrPlay.set(true);
+ $scope.ionRange.index = 0;
+ $scope.mycarousel.index = 1;
+ }
+
}
+ if (stopOrPlay.get() == true)
+ return;
+ $scope.ionRange.index = ($scope.mycarousel.index + 1).toString();
+ // console.log ("***IONRANGE RANGE CHANGED TO " + $scope.ionRange.index);
+
+
});
}