浏览代码

Merge pull request #6906 from BabylonJS/orientation-fullscreen-button

Update vrExperienceHelper.ts
David Catuhe 5 年之前
父节点
当前提交
dc483a11b9
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/Cameras/VR/vrExperienceHelper.ts

+ 2 - 0
src/Cameras/VR/vrExperienceHelper.ts

@@ -916,6 +916,8 @@ export class VRExperienceHelper {
             if (!this._useCustomVRButton && this._btnVR) {
                 this._btnVR.style.top = this._canvas.offsetTop + this._canvas.offsetHeight - 70 + "px";
                 this._btnVR.style.left = this._canvas.offsetLeft + this._canvas.offsetWidth - 100 + "px";
+                // make sure the button is visible after setting its position
+                this.updateButtonVisibility();
             }
         }
     }