]> source.dussan.org Git - jquery-ui.git/commitdiff
Effects core: Fixed indentation for color animation overrides.
authorScott González <scott.gonzalez@gmail.com>
Fri, 12 Jun 2009 13:26:45 +0000 (13:26 +0000)
committerScott González <scott.gonzalez@gmail.com>
Fri, 12 Jun 2009 13:26:45 +0000 (13:26 +0000)
ui/effects.core.js

index e1b7b251561fc133d4f1bce621888dbcf510e43f..cc74a123377a70704f84f9934bb924df0ae1d4bd 100644 (file)
@@ -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