How to change reference to the pano container

Q&A about the latest versions
Post Reply
ffurger
Posts: 88
Joined: Mon Mar 24, 2014 11:45 am

Mon Feb 22, 2021 2:31 pm

In my current project, I need to include everything related to the pano in a separate div container.
In other words, the pano container is NOT located in the document body, but one level down, like so:

Code: Select all

<body>
....
<div id="locationWrapper">
        <div id="panoContainer"></div>
</div>
...
</body>
Unfortunately, with this arrangement the statement

Code: Select all

   pano=new pano2vrPlayer("panoContainer") 
no longer works.
Putting the javascript code in the locationWrapper doesn't help.
pano2vrPlayer() apparently assumes that "panoContainer" is located in the body of the document.

How can I tell pano2vrPlayer() where exactly is the panoContainer located?

Thank you for your help!
christoph
Gnome
Posts: 103
Joined: Mon Aug 20, 2012 3:01 pm

Tue Feb 23, 2021 3:21 pm

Hi!
No, the container div can be anywhere, but i guess the problem in your example is, that both divs do not have a size.
Try adding
style="width:100%;height:100%;"
to both divs....

Regards,
Christoph
ffurger
Posts: 88
Joined: Mon Mar 24, 2014 11:45 am

Thu Feb 25, 2021 3:22 pm

Hi Christoph,

sorry for this late reply. Indeed, in the meantime I discovered that myself.
Not sure why initially it didn't work - may be an issue with caching, which gets me every once in a while.

At any rate thank you very much for getting back to me on this.

Best,
Franco
Post Reply