You are not logged in.

1

Thursday, January 10th 2019, 8:15am

fullscreen issue

hello everyone :
I create some elements in the tour.html,but when use the set('fullscreen', true),these elements will disappear
so I use the methods to resovle
```
let layer = this.krpano.get('control.layer')
layer.appendChild(elements)
```
but ,there has another question:
I use the button to execute the set('fullscreen', true) or toggle(fullscreen), then I krpano.call('WebVR.enterVR()'), these elements I create will still appear,
if I call the enterVR first ,these elements will be appear,
so ,how can I do to make the elements disappear when I set fullscreen then enterVR ,
or is there any events to listen the vr ,when I enter or exit the vr , I can use the css style `display:none | block` to show the right elements?

my want the elements is appear when fullscreen and disappear when in vr mode

2

Thursday, January 10th 2019, 1:17pm

Hi,

use the onentervr/onexitvr events:
https://krpano.com/plugins/webvr/#onentervr

E.g. from JS:

Source code

1
2
3
4
var my_events = krpano.get("events").createItem("my_event");
my_events.keep = true;
my_events.webvr_onentervr = function(){ ... };
my_events.webvr_onexitvr = function(){ ... };


Best regards,
Klaus