Skip to content

Commit deab32d

Browse files
authored
Update index.html (#5171)
1 parent 5e07053 commit deab32d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • packages/modelviewer.dev/examples/scenegraph

packages/modelviewer.dev/examples/scenegraph/index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ <h2 class="demo-title">Model Transformations</h2>
201201
.controls input[type=number] {
202202
-moz-appearance: textfield;
203203
}
204+
model-viewer#transform[ar-status="session-started"] .controls {
205+
position: fixed;
206+
}
204207
</style>
205208
<model-viewer id="transform" orientation="20deg 0 0" shadow-intensity="1" camera-controls
206209
touch-action="pan-y" ar src="../../shared-assets/models/Astronaut.glb"
@@ -266,7 +269,7 @@ <h2 class="demo-title">Model Transformations</h2>
266269
controls.style.transform = 'none';
267270
return;
268271
}
269-
const layoutHeight = window.innerHeight;
272+
const layoutHeight = document.documentElement.clientHeight;
270273
const visualHeight = window.visualViewport.height;
271274
const offsetTop = window.visualViewport.offsetTop;
272275
const offset = layoutHeight - (visualHeight + offsetTop);

0 commit comments

Comments
 (0)