Weird behaviour/possible bug onresize

  • are your <level> settings right?

    <image type="CUBE" multires="true" tilesize="1100" progressive="false">
    <level tiledimagewidth="2200" tiledimageheight="2200">
    <cube url="../pics/zephyr.tiles/%s_%0v_%0h.jpg" />
    </level>
    </image>

    or something ...in the scene tag?

    or the MFOV etc...settings??

    so when u have global fov settings and also in the scene tag... problems..

    Tuur *thumbsup*

  • Hi,

    not the pano image - the plugin images,

    e.g. when new plugin elements were defined in the new pano/scene and they should be positioned by the onresize event or when the onresize event should set a custom area size via code (e.g. like the fixed-aspect example),

    best regards,
    Klaus

  • Ok, I want the onresize action only trigger when there is an actiual resize (i have some plugins that reset there coordinates to 0,0 when a true resize happens). But I cant seem to get it working...

    resizehandler is the action that should be triggered if either stageheight/stagewidth got changed. If I trace the value, it seems that stagewidth and $_previous_stagewidth are a few pixels between eachother. I though adding a delay would help, but it doesnt.

    Any pointers?

  • Hi,

    I have tested your code and there was unforatunaly a bug in the if() parsing that avoids the correct working in this case:

    the current if() action parser detects the "GE" in the "_PREVIOUS_STAGEHEIGHT" variable name as GE (greater or equal) operator - which is wrong of course and leads to a wrong test condition,

    all string compare operators like LE, LT, GE, GT or EQ are affected by that problem when the variable name contains these strings in upper-case (lower-case will work),

    this will be fixed in the next release (and additionally the new and fixed if() operator parser will be ~1900% faster )

    a workaround for the moment would be to use lower-case variables,
    e.g. here the solution that I would recommend:

    Code
    <action name="resizeevent">
    set(stagesizechanged,false);
      if($_previous_stagewidth !== stagewidth, set(stagesizechanged,true));
      if($_previous_stageheight !== stageheight, set(stagesizechanged,true));
      if(stagesizechanged,
    	copy($_previous_stagewidth, stagewidth);	
    	copy($_previous_stageheight, stageheight);
    	resizehandler();
      );		
    </action>

    best regards,
    Klaus

Participate now!

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