diff options
Diffstat (limited to 'www/js/EventCtrl.js')
| -rw-r--r-- | www/js/EventCtrl.js | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index b3741489..70883b29 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -2823,23 +2823,27 @@ angular.module('zmApp.controllers') function recomputeThumbSize() { // NVRDataModel.debug("EventCtrl: recompute thumbnails"); - for (var i = 0; i < $scope.events.length; i++) { - var tempMon = NVRDataModel.getMonitorObject($scope.events[i].Event.MonitorId); - if (tempMon != undefined) { - - var mw = parseInt(tempMon.Monitor.Width); - var mh = parseInt(tempMon.Monitor.Height); - var mo = parseInt(tempMon.Monitor.Orientation); - - var th = computeThumbnailSize(mw, mh, mo); - $scope.events[i].Event.thumbWidth = th.w; - $scope.events[i].Event.thumbHeight = th.h; - //console.log ("Setting to "+th.w+"*"+th.h); - + // remember, devHeight/devWidth upate 300ms after rotation + $timeout ( function () { + for (var i = 0; i < $scope.events.length; i++) { + var tempMon = NVRDataModel.getMonitorObject($scope.events[i].Event.MonitorId); + if (tempMon != undefined) { + + var mw = parseInt(tempMon.Monitor.Width); + var mh = parseInt(tempMon.Monitor.Height); + var mo = parseInt(tempMon.Monitor.Orientation); + + var th = computeThumbnailSize(mw, mh, mo); + $scope.events[i].Event.thumbWidth = th.w; + $scope.events[i].Event.thumbHeight = th.h; + //console.log ("Setting to "+th.w+"*"+th.h); + + } + + } - - - } + },500); + } |
