Fix #13183: Wrong animation initial value calc. Close gh-1136.

This commit is contained in:
Mike Sherov
2013-01-15 23:09:35 -05:00
committed by Dave Methvin
parent 79feac9584
commit 65df32dc21
3 changed files with 27 additions and 10 deletions

4
src/effects.js vendored
View File

@@ -427,11 +427,11 @@ Tween.propHooks = {
return tween.elem[ tween.prop ];
}
// passing a non empty string as a 3rd parameter to .css will automatically
// passing an empty string as a 3rd parameter to .css will automatically
// attempt a parseFloat and fallback to a string if the parse fails
// so, simple values such as "10px" are parsed to Float.
// complex values such as "rotate(1rad)" are returned as is.
result = jQuery.css( tween.elem, tween.prop, "auto" );
result = jQuery.css( tween.elem, tween.prop, "" );
// Empty strings, null, undefined and "auto" are converted to 0.
return !result || result === "auto" ? 0 : result;
},