ソースを参照

Add iOS workaround to BoxGeometry (#9196)

* Add iOS workaround to BoxGeometry

* Update iOS workaround

* Update iOS workaround

* Update iOS workaround

* Update iOS workaround
Paul Masson 9 年 前
コミット
febb7f8d6b
1 ファイル変更17 行追加3 行削除
  1. 17 3
      docs/api/extras/geometries/BoxGeometry.html

+ 17 - 3
docs/api/extras/geometries/BoxGeometry.html

@@ -14,7 +14,23 @@
 
 		<div class="desc">BoxGeometry is the quadrilateral primitive geometry class. It is typically used for creating a cube or irregular quadrilateral of the dimensions provided with the 'width', 'height', and 'depth' constructor arguments.</div>
 
-		<iframe src='scenes/geometry-browser.html#BoxGeometry'></iframe>
+		<iframe id="scene" src="scenes/geometry-browser.html#BoxGeometry"></iframe>
+
+		<script>
+
+		// iOS iframe auto-resize workaround
+
+		if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
+
+			var scene = document.getElementById( 'scene' );
+
+			scene.style.width = getComputedStyle( scene ).width;
+			scene.style.height = getComputedStyle( scene ).height;
+			scene.setAttribute( 'scrolling', 'no' );
+
+		}
+
+		</script>
 
 		<h2>Example</h2>
 
@@ -26,7 +42,6 @@
 
 		<h2>Constructor</h2>
 
-
 		<h3>[name]([page:Float width], [page:Float height], [page:Float depth], [page:Integer widthSegments], [page:Integer heightSegments], [page:Integer depthSegments])</h3>
 		<div>
 		width — Width of the sides on the X axis.<br />
@@ -37,7 +52,6 @@
 		depthSegments — Optional. Number of segmented faces along the depth of the sides. Default is 1.
 		</div>
 
-
 		<h2>Properties</h2>
 
 		<h3>.parameters</h3>