Skip to content
Permalink
Browse files
Fix regression for "-200px" in animations; closes gh-822.
Also removes fake IIFEs ffrom effects.
  • Loading branch information
mikesherov authored and dmethvin committed Jun 12, 2012
1 parent f8c02c8 commit 87e709c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
@@ -1,8 +1,6 @@
(function( jQuery ) {

var fxNow, timerId,
rfxtypes = /^(?:toggle|show|hide)$/,
rfxnum = /^([\-+]=)?((?:\d*\.)?\d+)([a-z%]*)$/i,
rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,

This comment has been minimized.

Copy link
@gibson042

gibson042 Jun 12, 2012

Member

Why not reuse the ([\-+]?(?:\d*\.)?\d+) pattern from rnumsplit and rnumnonpx in css.js?

This comment has been minimized.

Copy link
@mikesherov

mikesherov Jun 12, 2012

Author Member

It doesn't capture relative animation: "+=200"

rrun = /queueHooks$/,
animationPrefilters = [ defaultPrefilter ],
tweeners = {
@@ -633,5 +631,3 @@ if ( jQuery.expr && jQuery.expr.filters ) {
}).length;
};
}

})( jQuery );
@@ -197,6 +197,15 @@ test("animate negative margin", function() {
});
});

test("animate negative margin with px", function() {
expect(1);
stop();
jQuery("#foo").animate({ marginTop: "-100px" }, 100, function() {
equal( jQuery(this).css("marginTop"), "-100px", "Verify margin." );
start();
});
});

test("animate negative padding", function() {
expect(1);
stop();

0 comments on commit 87e709c

Please sign in to comment.