Setting/tweening x,y values modifies the alpha of a plugin?

  • Dear Klaus,

    we have a strange issue with on of our plugins. The code is quite complex, but the point is that we have this section in the code

    Code
    if(tweening_in) {
    	krpano.call("tween(plugin[" + mapPlugin.name + "].x," + (mapPlugin.width * Math.min(wScaleFactor, hScaleFactor) / 2) + ",0.25)");
    	krpano.call("tween(plugin[" + mapPlugin.name + "].y," + (mapPlugin.height * Math.min(wScaleFactor, hScaleFactor) / 2) + ",0.25)");
    } else {
    	mapPlugin.x = (mapPlugin.width * Math.min(wScaleFactor, hScaleFactor) / 2);
    	mapPlugin.y = (mapPlugin.height * Math.min(wScaleFactor, hScaleFactor) / 2);
    }

    and this whole section is inside of a function being called in the global onresize event. As you can clearly see all this snippet does is it modifies the x and y attributes of a plugin, either by setting them directly or tweening them, depending on the tweening_in variable. The point here is that obviously none of this code should affect the alpha of the plugin. However, it does, since if I comment it out (just the above), the alpha doesn't change (hence I was saying that the overall code is quite complex but this is the exact part that somehow causes the error). Oh, just to clarify, at this point the plugin in question is hidden, and what happens is that it appears during the onresize, so basically the alpha is somehow getting set to 1.

    Is this a bug, or am I missing something here? Thanks in advance!

Participate now!

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