My third example there was wrong due to a typo.
Sorry.

Here is the updated fiddle:
http://jsfiddle.net/S7Xpx/5/

A bit more testing shows that when MooTools is passed a percentage, it
drops the '%' and assumes pixels.
If told to tween to '110%' it will tween to 110px.

This particularly annoying when morphing from a class that includes a
percentage. (See Seth there)

I assume this is the correct behavior, however:
Could this be added to the docs?
Could this be improved upon for MooTools 2?

Sam



On Dec 10, 11:22 am, SamGoody <[email protected]> wrote:
> Am very confused on how set and tween figure out their numbers.
>
> Please look at:http://jsfiddle.net/S7Xpx/3/
>
> None of the examples behave as I would expect.
>
> 1. Cain should tween to a width of 100%, or 200px. Instead it tweens
> to a width of 100px.
> 2. Abel sets the width property to 100%, but that seems to be
> overridden by the style of 25% width. Is that correct? Should that be
> expected in all browsers?
> 3. Enosh's style should be 200px. But neither tween nor setStyle work.
>
> The same behavior shows in MooTools 1.2 (according to jsfiddle).
> I have this feeling that I am just missing the obvious (it's late).
>
> Please help me understand.
>
> Sam

Reply via email to