Cannot tween the clip:rect top property #2460

unilynx opened this Issue Jan 7, 2013 · 1 comment


None yet
2 participants

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:

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

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


This comment has been minimized.

Show comment Hide comment

ibolmo Mar 3, 2014


Related #2236, #2531


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