Cannot tween the clip:rect top property #2460

Closed
unilynx opened this Issue Jan 7, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@unilynx

unilynx commented Jan 7, 2013

I'm unable to tween the 'top' property of a clip:rect with mootools. the 'right' property works fine

It seems to be related to how the 'rect(..)' is tokenized by Fx.CSS - the first part is tokenized as "rect(0px" which breaks the compute

Adding this to fix the parsing of the first 'rect' token fixed the issue for me if a rect() is already set, but it's not a complete fix - it fails if no clip:rect() at all is set yet:

Fx.CSS.Parsers.Rect={
parse: function(value){
if (value.substr(0,5)=='rect(')
return parseFloat(value.substr(5));
return false;
},
compute: Fx.compute,
serve: function(value){
console.log(value);
return 'rect(' + value + 'px';
}
};

See here for a demonstration: http://jsfiddle.net/mY9Eh/
With the workaround, the second animation works but the first completes immediately.
Without the workaround, they all complete immediately

@ibolmo

This comment has been minimized.

Show comment Hide comment
@ibolmo

ibolmo Mar 3, 2014

Owner

Related #2236, #2531

Owner

ibolmo commented Mar 3, 2014

Related #2236, #2531

@ibolmo ibolmo closed this Mar 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment