Skip to content

Commit

Permalink
Use document body offset height and width instead of window inner hei…
Browse files Browse the repository at this point in the history
…ght and width to fix aframevr#3525
  • Loading branch information
RSpace authored and ngokevin committed Aug 15, 2018
1 parent b2460ea commit 10a9433
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/scene/a-scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ function getMaxSize (maxSize, isVR) {
var size;
var pixelRatio = window.devicePixelRatio;

size = {height: window.innerHeight, width: window.innerWidth};
size = {height: document.body.offsetHeight, width: document.body.offsetWidth};
if (!maxSize || isVR || (maxSize.width === -1 && maxSize.height === -1)) {
return size;
}
Expand Down

0 comments on commit 10a9433

Please sign in to comment.