action to change the hfov of image xml parametre by clik

  • Hello i want to enable an specific view on picture :
    I want that at the beginning we can see the full view of the pano hfov: 180 in image, and after the first click i want to change the view change and be like the view we get with hfov set to 80.

    Is it possible by an action ton change this setting ??

  • I have try and i try again after your answer but is not working :

    <item name="item2"
    caption="About the Photographer..."
    onclick="set(image.hfov,180);"
    />

    I have one other solution is to make one xml with the full parameter of panorama 1 and hfov="80" and on other with full parameter of the same pano but with hfov="130" , the second is load on clik of a hotspot with is the full first panorama.
    But did you have sometime more easy ??

  • Thanks for you answer , but i don't understand tow points :


    -How can i create an action witch is load when I'm zooming on and out from a point ?

    -Who is the syntax to change the hfov with an reloadpano() , where did i past the new parameter ?


    Thanks !

  • I think klaus means you change the hfov and vfov variables first, and THEN you use reloadpano(); this should force the image to acknowledge the new values.

    To detect when you're zooming in and out you could detect the keys and buttons that make you zoom in and out, such as ctrl, shift or the mouse wheel:

    <events onmousewheel="..." />

    Just an idea.

  • I'm a bit stupid but i still don't understand where i past the variable for the new hfov ?
    Can you teach me ?
    Sorry but i can make an action but how can i change the parameter like hfov witch are static, because if i reload the pano, the xml will be still the same with hfov=10 at the beginning !!??

    Thanks for your help !!

  • Hi toutcoolpedro,

    Quote

    I'm a bit stupid but......

    Tout Cooool Pedro *g* *wink* .....

    Quote

    Sorry but i can make an action but how can i change the parameter like hfov witch are static, because if i reload the pano, the xml will be still the same with hfov=10 at the beginning !!??

    The reloadpano() action does not reloads the original xml but the one allready in memory (with the changes mades dynamically)...
    So, a possible code could be:


    But note: normally, when setting an hfov inside the image node, the vfov it is calculated automatically... but it seems that it is not the case when the hfov is changed dynamically... so, you have to set the vfov dynamically also...

    Hope this help...

    KLAUS,
    The reloadpano() action is missing inside the Quick Referencehttps://krpano.com/forum/wbb/../../docu/quickref/ *rolleyes* ...

    SAlut.

Participate now!

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