forked from EXT/VR180-Web-Player
Fix 2D canvas positioning bug
- Changed canvas positioning from absolute to relative in start2DMode() - Resolves issue where content below video was hidden underneath canvas - Fixes canvas disappearing during page resize and fullscreen operations - Canvas now properly flows within document layout
This commit is contained in:
@@ -1436,9 +1436,7 @@ function start2DMode() {
|
|||||||
|
|
||||||
// Position the canvas to match the video element
|
// Position the canvas to match the video element
|
||||||
const canvas = renderer.domElement;
|
const canvas = renderer.domElement;
|
||||||
canvas.style.position = 'absolute';
|
canvas.style.position = 'relative';
|
||||||
canvas.style.top = '0';
|
|
||||||
canvas.style.left = '0';
|
|
||||||
canvas.style.width = '100%';
|
canvas.style.width = '100%';
|
||||||
canvas.style.height = 'auto';
|
canvas.style.height = 'auto';
|
||||||
canvas.style.aspectRatio = '16/9';
|
canvas.style.aspectRatio = '16/9';
|
||||||
|
|||||||
Reference in New Issue
Block a user