diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-08-18 09:16:28 -0500 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-08-18 09:16:28 -0500 |
| commit | 890396d763d613d76aee9a3d9af3850116a0ebf8 (patch) | |
| tree | d7c813b30c234adaee07110db33c7ac812119ae4 /www/js/EventCtrl.js | |
| parent | cb120b110fb062a19b73837cd812db243455ca11 (diff) | |
#296 - make sure index of frame is real index
Former-commit-id: 74cec5899c7a826420c0d46661abbb1abc439a2c
Diffstat (limited to 'www/js/EventCtrl.js')
| -rw-r--r-- | www/js/EventCtrl.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index c827f98c..b6c99b76 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -427,12 +427,40 @@ angular.module('zmApp.controllers') var img; + //console.log ("HERE"); $scope.kFrame = $translate.instant ('kFrame'); $scope.kEvent = $translate.instant ('kEvent'); $scope.ndx = ndx; $scope.parray = parray; $scope.imode = imode; + // note ndx may be incorrect if we are looking + // at unique frames; + + // ZMDataModel.zmDebug("Hello"); + if ($scope.typeOfFrames == $translate.instant('kShowTimeDiffFrames')) + { + + var ic; + + for ( ic = 0; ic < $scope.parray.length; ic++) + { + if ($scope.parray[ic].frameid == fid) + break; + } + + + ZMDataModel.zmDebug ("Readjusting selected frame ID from:"+$scope.ndx+" to actual frame ID of:" + ic); + $scope.ndx = ic; + } + else + { + ZMDataModel.zmDebug ("No index adjustment necessary as we are using all frames"); + } + + + + // console.log ("Image Mode " + imode); // console.log ("parray : " + JSON.stringify(parray)); // console.log ("index: " + ndx); |
