Interactivity between hotspots for info box.

  • Hello,

    I recently create a simple virtual tour of a bank Digital Lounge. There are some info box hotspot in the scene that will pop when clicked.

    http://idvr360.com/client/cimbniaga/dlgc1/


    My current issues are:
    1. I want the info box popup automatically closed when user click on another info box hotspot within the same pano scene, how can i achieve that?

    2. The info box popup is becoming extremely big filling the whole screen! how can scale it so it is only sized proportionally in the middle of the screen? The only info box pop up that showing in proper size is the one located at the grey wall.

    Really appreciate it if somebody can give examples regarding what code do i have to put in the xml files, coding is kinda challenging for me..:D

    If needed, here is the tour.xml & skin folder in a zip file: http://idvr360.com/client/cimbniaga/dlgc1/tourandskin.zip

    Thank you :)

  • Hi Umalo,

    Thank you for the response :)

    I think I am able to solve issues no.2 but having difficulties with issues no.1...

    1. Or you create one action that will first make all your infoboxes invisible and than setting only one you are interested in to visible. Or you don't use more infoboxes layers but one changing its url and ath / atv (you can read them from clicked hotspot)
    Something similar you have:
    https://krpano.com/forum/wbb/inde…51388#post51388


    I am sending you a private mail for the complete project files, hopefully you are willing to give me an example of your proposed solution using one or two hotspots....:)

    Thank you :)

  • Here you go: Link
    Code: here

    Try to keep your info images more consistent in size. Current code takes care if image orientation is landscape or portrait and apply 70% of the screensize to them (you can change % in first line of included code settings)
    (used only preview - not to be confused my loading text displayed all the time)

  • Hi Anton,

    Apology for the late response in this thread :)

    Thank you for the solution! Works perfectly!

    I am trying to make some modification to your solution. My goal is to have a separate infoboxscreenratio for mobile device (be it iOS / android / others).

    Current code works just perfect, it is just when user view the pano using bigger screen such as laptop or desktop with big screen, the infobox becoming quite an enormous size :D

  • You are right. As you see images are sized based on screen % height/width depending on if portrait or landscape.
    My proposal is to adapt the fix_infobox_aspectresize actions to be active only in case that user screen size is hot higher than XY px.
    In that case regular size of image is to be displayed or with smaller (maybe varalbe) screen %. That mean with simple 2-3 lines of code you can make this adaptations.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!