diff options
author | Scott González <scott.gonzalez@gmail.com> | 2009-06-12 13:26:45 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2009-06-12 13:26:45 +0000 |
commit | f22f205cfc3c71d54f47da702c07a978f07a27c9 (patch) | |
tree | 5fa3b1c127484ce24e8137be2e6cc90569eddf72 /ui/effects.core.js | |
parent | b129e79ba7d12ede5f09f85f2b932fc1a10a17ca (diff) | |
download | jquery-ui-f22f205cfc3c71d54f47da702c07a978f07a27c9.tar.gz jquery-ui-f22f205cfc3c71d54f47da702c07a978f07a27c9.zip |
Effects core: Fixed indentation for color animation overrides.
Diffstat (limited to 'ui/effects.core.js')
-rw-r--r-- | ui/effects.core.js | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/ui/effects.core.js b/ui/effects.core.js index e1b7b2515..cc74a1233 100644 --- a/ui/effects.core.js +++ b/ui/effects.core.js @@ -237,26 +237,23 @@ $.fn.extend({ } }); -/* - * jQuery Color Animations - * Copyright 2007 John Resig - * Released under the MIT and GPL licenses. - */ -// We override the animation for all of these color styles -$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){ - $.fx.step[attr] = function(fx) { - if ( fx.state == 0 ) { - fx.start = getColor( fx.elem, attr ); - fx.end = getRGB( fx.end ); - } - - fx.elem.style[attr] = "rgb(" + [ - Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0],10), 255), 0), - Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1],10), 255), 0), - Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2],10), 255), 0) - ].join(",") + ")"; - }; +// override the animation for color styles +$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', + 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], + function(i,attr){ + $.fx.step[attr] = function(fx) { + if (fx.state == 0) { + fx.start = getColor( fx.elem, attr ); + fx.end = getRGB( fx.end ); + } + + fx.elem.style[attr] = "rgb(" + [ + Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0],10), 255), 0), + Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1],10), 255), 0), + Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2],10), 255), 0) + ].join(",") + ")"; + }; }); // Color Conversion functions from highlightFade |