diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-12-15 04:33:06 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-12-15 04:33:06 +0300 |
commit | 06ea5f7dbb4f428064a5c5cdeab308cb068e791d (patch) | |
tree | 957ece0151c74363ab3c6ddd28e09a9da236a56d /js | |
parent | 3e14a2342ba79ca2829546213d52de6f8ccd7c75 (diff) |
fixes #9371 make sure to use integers for resolution when devicePixelRatio is eg 1.0001
Diffstat (limited to 'js')
-rw-r--r-- | js/piwik.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/js/piwik.js b/js/piwik.js index 344e5436e9..773b38bf8d 100644 --- a/js/piwik.js +++ b/js/piwik.js @@ -5000,8 +5000,9 @@ if (typeof Piwik !== 'object') { browserFeatures.cookie = hasCookies(); } - // screen resolution - browserFeatures.res = screenAlias.width * devicePixelRatio + 'x' + screenAlias.height * devicePixelRatio; + var width = parseInt(screenAlias.width, 10) * devicePixelRatio; + var height = parseInt(screenAlias.height, 10) * devicePixelRatio; + browserFeatures.res = parseInt(width, 10) + 'x' + parseInt(height, 10); } /*<DEBUG>*/ |