diff options
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/NVR.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/www/js/NVR.js b/www/js/NVR.js index 93897623..ec66b438 100644 --- a/www/js/NVR.js +++ b/www/js/NVR.js @@ -327,17 +327,20 @@ angular.module('zmApp.controllers') } 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; + $rootScope.devHeightIgnorePix = $rootScope.devHeight; + //$rootScope.devWidth *= pixelRatio; + //$rootScope.devHeight *= pixelRatio; + $rootScope.videoHeight = $rootScope.devHeight - 20; debug("resize/orient: " + $rootScope.devWidth + "(w) * " + $rootScope.devHeight+"(h)"); + } |
