Просмотр исходного кода

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

Update vrExperienceHelper.ts
David Catuhe 5 лет назад
Родитель
Сommit
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();
             }
         }
     }