remove more useless code. feels good.
This commit is contained in:
parent
eccf15be6c
commit
7666c3ef9a
17
src/effects.js
vendored
17
src/effects.js
vendored
|
@ -129,7 +129,7 @@ jQuery.fn.extend({
|
||||||
isElement = this.nodeType === 1,
|
isElement = this.nodeType === 1,
|
||||||
hidden = isElement && jQuery(this).is(":hidden"),
|
hidden = isElement && jQuery(this).is(":hidden"),
|
||||||
name, val, p,
|
name, val, p,
|
||||||
easing, display, e,
|
display, e,
|
||||||
parts, start, end, unit;
|
parts, start, end, unit;
|
||||||
|
|
||||||
// will store per property easing and be used to determine when an animation is complete
|
// will store per property easing and be used to determine when an animation is complete
|
||||||
|
@ -142,16 +142,15 @@ jQuery.fn.extend({
|
||||||
if ( p !== name ) {
|
if ( p !== name ) {
|
||||||
prop[ name ] = prop[ p ];
|
prop[ name ] = prop[ p ];
|
||||||
delete prop[ p ];
|
delete prop[ p ];
|
||||||
p = name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val = prop[p];
|
val = prop[name];
|
||||||
|
|
||||||
if ( val === "hide" && hidden || val === "show" && !hidden ) {
|
if ( val === "hide" && hidden || val === "show" && !hidden ) {
|
||||||
return opt.complete.call(this);
|
return opt.complete.call(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( isElement && ( p === "height" || p === "width" ) ) {
|
if ( isElement && ( name === "height" || name === "width" ) ) {
|
||||||
// Make sure that nothing sneaks out
|
// Make sure that nothing sneaks out
|
||||||
// Record all 3 overflow attributes because IE does not
|
// Record all 3 overflow attributes because IE does not
|
||||||
// change the overflow attribute when overflowX and
|
// change the overflow attribute when overflowX and
|
||||||
|
@ -183,13 +182,9 @@ jQuery.fn.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
// easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
|
// easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
|
||||||
if ( jQuery.isArray( val ) ) {
|
opt.animatedProperties[name] = jQuery.isArray( val ) ?
|
||||||
easing = val[1];
|
val[1]:
|
||||||
val = val[0];
|
opt.specialEasing && opt.specialEasing[p] || opt.easing || 'swing';
|
||||||
} else {
|
|
||||||
easing = opt.specialEasing && opt.specialEasing[p] || opt.easing || 'swing';
|
|
||||||
}
|
|
||||||
opt.animatedProperties[p] = easing;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( opt.overflow != null ) {
|
if ( opt.overflow != null ) {
|
||||||
|
|
Loading…
Reference in a new issue