You are not logged in.


Monday, December 1st 2014, 10:38am

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

Source code

if(tweening_in) {"tween(plugin[" + + "].x," + (mapPlugin.width * Math.min(wScaleFactor, hScaleFactor) / 2) + ",0.25)");"tween(plugin[" + + "].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!


Monday, December 1st 2014, 1:51pm


there is no known bug here and normally it should be impossible that changing the x/y values would modify also the alpha value...

Best regards,


Monday, December 1st 2014, 10:48pm

All right, thanks, I will look into it more carefully.