I add div with js in pano,it works.but when I enter the fullscreen mode with kr action(switch(fullscreen);),the div disappear.
if I enter fullscreen mode with F11(Browser's function),div still there.
Thx for your help !!!
I add div with js in pano,it works.but when I enter the fullscreen mode with kr action(switch(fullscreen);),the div disappear.
if I enter fullscreen mode with F11(Browser's function),div still there.
Thx for your help !!!
Hi,
when using the 'F11 browser fullscreen', the browsers makes the whole webpage fullscreen,
but when using the HTML5 fullscreen API via krpano, then only the krpano element gets into fullscreen mode.
For adding custom div elements to krpano, I would recommend the plugin API:
https://krpano.com/docu/plugininterface/#top
but it would be also possible to get internal div elements where custom elements could be added:
var layer = krpano.get("control.layer");
or
var layer = krpano.get("display.viewerlayer");
and then:
layer.appendChild( your_custom_div );
Best regards,
Klaus
layer.appendChild(document.getElementById(" your_custom_div"));
Hi,
with newer krpano versions it is also possible to define a custom html element that should be used for the fullscreen mode:
https://krpano.com/docu/xml/#display.customFullscreenElement
That could be set to an external element that contains the krpano viewer and your custom html elements.
Here an example that uses that (see the sync.xml) - there two krpano viewers are used and they got together into fullscreen mode:
https://krpano.com/examples/#js-sync-viewers
Best regards,
Klaus
Thanks, Klaus
Thank!!
Don’t have an account yet? Register yourself now and be a part of our community!