Auto pan to move info or video panel in the center of the screen

Q&A about the latest versions
Post Reply
User avatar
Hrvoje
Posts: 173
Joined: Sat Feb 28, 2009 7:34 pm
Location: Zagreb, Croatia
Contact:

Hello

Please take a look into pano here: URL removed
Try to click into info box or video box.
Note how they opens outside of the window.

Questions:

1. Is it possible to make it so when button is clicked it automatically pans pano so that opened panel gets centered in the middle?
It should calculate width and height of itself, calculate screen width and height and pan panorama so that opened panel is in center
Or maybe to just pan it to put whole box in the screen, to avoid speedy pan


2. How to make that when one infobox panel or video panel is opened, clicking any other info or video icon closes all previously opened info box or video windows?

3. Unrelated to previous,
Is it possible to include text with images (which can be enlarged up on click) added by using Camera icon?
I need to have a text below the image, which also follows image 3D distortion.
I tried to use web elements option, but its very difficult to pose it properly below image.

- Any suggestion is welcome


Using latest P2VR pro

Thanks,
Regards
Last edited by Hrvoje on Fri Sep 15, 2023 2:04 pm, edited 1 time in total.
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi Hrvoje,

Question 1
1. Is it possible to make it so when button is clicked it automatically pans pano so that opened panel gets centered in the middle?
Attached Image_2.
Without seeing the project files it looks as though the panel is contained within the Hotspot Template. If this is the desired effect then you could do something like I have in my tutorial Zoom to Point Hotspot https://tonyredhead.com/pano2vr-little- ... to-hotspot.

The conventional way is to have the panel as a separate element positioned in the center of the skin and controlled by an Action/s in the Hotspot Template. So click on the Hotspot, the action sets a variable to true, the panel appears, click the close button and it sets a variable to false, the panel disappears.
It should calculate width and height of itself, calculate screen width and height and pan panorama so that opened panel is in center
Or maybe to just pan it to put whole box in the screen, to avoid speedy pan
You can use CSS in the Heigh and Width of the element to set the panel dimensions so it's centered and maintains its aspect ratio and resizes to match the browser window size. You can see how I've applied it to a text element in this tutorial Maintaining the Aspect Ratio of an iFrame https://tonyredhead.com/pano2vr-little- ... tio-iframe

Note: This tutorial refers to an iFrame but it's really a text box with iFrame code.

Question 2
How to make that when one infobox panel or video panel is opened, clicking any other info or video icon closes all previously opened info box or video windows?
Use a variable in the Visible logic block of the elements you want to show/hide. In practice you would only open one popup panel at a time. So all your Hotspots would have a Visible logic block that when a variable is true, they are all hidden, when the variable is false they are all visible.

Question 3
Is it possible to include text with images (whjich can be enlarged up on click) added by using Camera icon?
I need to have a text below the image, which also follows image 3D distortion.
I tried to use web elements option, but its very difficult to pose it properly below image.
You can add the text to the image, or you could create an HTML page that contained the image and text and open that in a embedded Web Elements Hotspot with a click mode popout.

There are a number of great video tutorials on the Gardengnome Youtube website that should cover most of the issues.

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
Hrvoje
Posts: 173
Joined: Sat Feb 28, 2009 7:34 pm
Location: Zagreb, Croatia
Contact:

Hello

Thanks for quick reply.
Solution in Zoom to Point Hotspot tutorial works flawlessly.

Best regards
Post Reply