From 2005d6745cfe69955f5b9ca59492b08aefe8faa1 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Sun, 3 Jul 2016 12:29:25 -0700 Subject: [PATCH] Examples: More flexible iOS workaround. --- examples/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/index.html b/examples/index.html index 32f2463039..4a8ee0981c 100644 --- a/examples/index.html +++ b/examples/index.html @@ -268,8 +268,8 @@ if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) { - viewer.style.width = window.innerWidth - 310 + 'px'; - viewer.style.height = window.innerHeight + 'px'; + viewer.style.width = getComputedStyle( viewer ).width; + viewer.style.height = getComputedStyle( viewer ).height; viewer.setAttribute( 'scrolling', 'no' ); } -- GitLab