diff options
Diffstat (limited to 'www/js/app.js')
| -rwxr-xr-x | www/js/app.js | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/www/js/app.js b/www/js/app.js index c35d52aa..a21d2da1 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -1153,7 +1153,7 @@ angular.module('zmApp', [ NVR.log ("setting size"); $timeout (function () { - computeDeviceSize(); + NVR.computeDeviceSize(); },30); @@ -1421,20 +1421,7 @@ angular.module('zmApp', [ }); } - function computeDeviceSize() { - var pixelRatio = window.devicePixelRatio || 1; - $rootScope.pixelRatio = pixelRatio; - $rootScope.devWidth = ((window.innerWidth > 0) ? window.innerWidth : screen.width); - $rootScope.devHeight = ((window.innerHeight > 0) ? window.innerHeight : screen.height); - $rootScope.videoHeight = $rootScope.devHeight - 20; - $rootScope.devWidthIgnorePix = $rootScope.devWidth; - - $rootScope.devWidth *= pixelRatio; - $rootScope.devHeight *= pixelRatio; - - NVR.debug("resize/orient: " + $rootScope.devWidth + "(w) * " + $rootScope.devHeight+"(h)"); - - } + function onOnline() { $timeout(function () { @@ -1497,7 +1484,7 @@ angular.module('zmApp', [ // give rotation time to actually rotate, or width/height will be bogus $timeout ( function() { - computeDeviceSize(); + NVR.computeDeviceSize(); $rootScope.$broadcast('sizechanged'); },300); |
