diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2017-12-09 12:41:42 -0500 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2017-12-09 12:41:42 -0500 |
| commit | 02b539d381517228fec72235c3b8c5a5659bd711 (patch) | |
| tree | 8e71d548378c4184239493716764a7befb9de394 /www/js | |
| parent | 21856d3106726668616fdf4b96e9a7b02ce69d42 (diff) | |
#91 rotated image fix and other typos
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/EventCtrl.js | 32 |
1 files changed, 21 insertions, 11 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 } |
