Skip to content

Commit 2005d67

Browse files
committed
Examples: More flexible iOS workaround.
1 parent c0537d2 commit 2005d67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ <h1><a href="http://threejs.org">three.js</a> / examples</h1>
268268

269269
if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
270270

271-
viewer.style.width = window.innerWidth - 310 + 'px';
272-
viewer.style.height = window.innerHeight + 'px';
271+
viewer.style.width = getComputedStyle( viewer ).width;
272+
viewer.style.height = getComputedStyle( viewer ).height;
273273
viewer.setAttribute( 'scrolling', 'no' );
274274

275275
}

0 commit comments

Comments
 (0)