Zoom slider Flat panorama

  • Hi,
    To update a zoom indicator for regular panoramas we can use this action :

    Code
    <action name="updateslider">
      sub(val, view.fov, view.fovmin);
      sub(fovrange, view.fovmax, view.fovmin);
      div(val, fovrange);
      mul(plugin[slider_grip].y, val, plugin[slider_bg].pixelheight);
    </action>

    but when the pano is flat how to set the correct fovmax value as it changes according to the screen and image ratio when limitview is set to auto ?
    thnx !

  • <layer name="slider_bg" type="container" keep="true" maskchildren="true" align="righttop" bgroundedge="5" bgcolor="0xffffff" bgalpha="0.1" x="5" y="100" width="10" >
    <layer name="slider_grip" type="container" align="top" edge="top" bgroundedge="5" bgcolor="0xffffff" bgalpha="0.4" keep="true" width="10" height="20"/>
    </layer>


    <events onviewchanged="updateslider();" />

    <action name="updateslider">
    calc(plugin[slider_bg].height, view.fovmax);

    sub(val, view.fov, view.fovmin);
    sub(fovrange, view.fovmax, view.fovmin);
    div(val, fovrange);

    calc(plugin[slider_grip].y, val * plugin[slider_bg].pixelheight - plugin[slider_grip].pixelheight );


    if(plugin[slider_grip].y LT 0,
    set(plugin[slider_grip].y,0);
    );

    trace(plugin[slider_grip].y);
    </action>

  • Ok, in fact the trick was to set the fovmax according to the screen and image ratio...

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!