diff options
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/EventCtrl.js | 32 | ||||
| -rw-r--r-- | www/templates/events.html | 9 |
2 files changed, 26 insertions, 15 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 73c6c77d..e12d2f32 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -427,7 +427,9 @@ angular.module('zmApp.controllers') var ratio; var mw = parseInt(tempMon.Monitor.Width); var mh = parseInt(tempMon.Monitor.Height); - var mo = Math.abs(parseInt(tempMon.Monitor.Orientation)); + var mo =parseInt(tempMon.Monitor.Orientation); + + myevents[i].Event.Rotation = ''; // scale by X if width > height if (mw > mh ) { @@ -443,10 +445,15 @@ angular.module('zmApp.controllers') } - if (mo == 90) { - var t = myevents[i].Event.thumbHeight; - myevents[i].Event.thumbWidth = myevents[i].Event.thumbHeight; - myevents[i].Event.thumbHeight = t; + if (mo != 0) { + /* + myevents[i].Event.Rotation = { + 'transform' : 'rotate('+mo+'deg'+')' + }; */ + + var tmp = myevents[i].Event.thumbHeight; + myevents[i].Event.thumbHeight = myevents[i].Event.thumbWidth; + myevents[i].Event.thumbWidth = tmp; } // swap @@ -2968,7 +2975,7 @@ angular.module('zmApp.controllers') var ratio; var mw = parseInt(tempMon.Monitor.Width); var mh = parseInt(tempMon.Monitor.Height); - var mo = Math.abs(parseInt(tempMon.Monitor.Orientation)); + var mo = parseInt(tempMon.Monitor.Orientation); // scale by X if width > height if (mw > mh ) { @@ -2983,13 +2990,16 @@ angular.module('zmApp.controllers') myevents[i].Event.thumbWidth = Math.round(mw/ratio); } + if (mo != 0) { - if (mo == 90) { - var t = myevents[i].Event.thumbHeight; - myevents[i].Event.thumbWidth = myevents[i].Event.thumbHeight; - myevents[i].Event.thumbHeight = t; - + /*myevents[i].Event.Rotation = { + 'transform' : 'rotate('+mo+'deg'+')' + }; */ + var tmp = myevents[i].Event.thumbHeight; + myevents[i].Event.thumbHeight = myevents[i].Event.thumbWidth; + myevents[i].Event.thumbWidth = tmp; + } // swap } diff --git a/www/templates/events.html b/www/templates/events.html index 999c8c88..41e5b104 100644 --- a/www/templates/events.html +++ b/www/templates/events.html @@ -64,7 +64,7 @@ <div class="col"> <div class="item-text-wrap"> - <b><i ng-if="event.Event.Archived=='1'" class="ion-ios-flag" style="color:red"> </i>{{event.Event.MonitorName}}</b> <span ng-if"!loginData.enableThumbs || !event.Event.MaxScore">({{event.Event.Id}})</span> + <b><i ng-if="event.Event.Archived=='1'" class="ion-ios-flag" style="color:red"> </i>{{event.Event.MonitorName}}</b> <span ng-if="!loginData.enableThumbs &&event.Event.MaxScoreFrameId">({{event.Event.Id}})</span> <button ng-if="gifshotSupported && loginData.enableGIFMP4 " class="button button-small button-clear icon gif-icon" ng-click="permissionsDownload(event)"> </button> @@ -85,11 +85,12 @@ </div> - <div ng-if="loginData.enableThumbs && event.Event.MaxScore" class = "col col-left"> + <div ng-if="loginData.enableThumbs && event.Event.MaxScoreFrameId" class = "col col-left" style="max-height:150px" > <!-- thumbnail --> - <!-- ng-image-appear transition-duration="0.5s" animation="fillIn" bg-color="#50a4e2" --> - <img ng-image-appear transition-duration="0.3s" animation="fillIn" bg-color="#50a4e2" width="{{event.Event.thumbWidth}}px" height="{{event.Event.thumbHeight}}px" ng-src="{{event.Event.baseURL}}/index.php?view=image&fid={{event.Event.MaxScoreFrameId}}&width={{event.Event.thumbWidth*2}}&height={{event.Event.thumbHeight*2}}" on-tap="showThumbnail(event.Event.baseURL,event.Event.MaxScoreFrameId)" /> + <!-- ng-image-appear transition-duration="0.5s" animation="fillIn" bg-color="#50a4e2" {{event.Event.thumbWidth}}X{{event.Event.thumbHeight}}--> + + <img ng-image-appear transition-duration="0.3s" animation="fillIn" bg-color="#50a4e2" width="{{event.Event.thumbWidth}}px" height="{{event.Event.thumbHeight}}px" ng-src="{{event.Event.baseURL}}/index.php?view=image&fid={{event.Event.MaxScoreFrameId}}&width={{event.Event.thumbWidth*2}}&height={{event.Event.thumbHeight*2}}" on-tap="showThumbnail(event.Event.baseURL,event.Event.MaxScoreFrameId)" /> <!--<p>{{event.Event.thumbWidth}}px*{{event.Event.thumbHeight}}px</p>--> |
