Skip to content

Commit e572c6c

Browse files
committed
Don't try to restore values which weren't saved.
For example, this fixes the removal of a valid positioning that was before calling fadeIn(ms).
1 parent 8e53823 commit e572c6c

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

scripts/src/jquery.animate-enhanced.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Changelog:
7676
7777
0.99 (5/12/2012):
7878
- PR #109 Added support for list-item nodes. FadeIn on tags was omitting the list-style support. (thx @SeanCannon)
79-
79+
8080
0.98 (12/11/2012):
8181
- Merging pull request #106 thx @gboysko - checking for ownerDocument before using getComputedStyle
8282
@@ -89,7 +89,7 @@ Changelog:
8989
0.96 (20/08/2012):
9090
- Fixes for context, all elements returned as context (issue #84)
9191
- Reset position with leaveTransforms !== true fixes (issue #93)
92-
92+
9393
9494
0.95 (20/08/2012):
9595
- If target opacity == current opacity, pass back to jquery native to get callback firing (#94)
@@ -328,7 +328,7 @@ Changelog:
328328
// this is a nasty fix, but we check for prop == 'd' to see if we're dealing with SVG, and abort
329329
if (prop == "d") return;
330330
if (!_isValidElement(e)) return;
331-
331+
332332
var parts = rfxnum.exec(val),
333333
start = e.css(prop) === 'auto' ? 0 : e.css(prop),
334334
cleanCSSStart = typeof start == 'string' ? _cleanValue(start) : start,
@@ -609,8 +609,8 @@ Changelog:
609609
toggle3DByDefault: function() {
610610
return use3DByDefault = !use3DByDefault;
611611
},
612-
613-
612+
613+
614614
/**
615615
@public
616616
@name toggleDisabledByDefault
@@ -719,8 +719,11 @@ Changelog:
719719
}
720720
if (isTranslatable && typeof selfCSSData.meta !== 'undefined') {
721721
for (var j = 0, dir; (dir = directions[j]); ++j) {
722-
restore[dir] = selfCSSData.meta[dir + '_o'] + valUnit;
723-
jQuery(this).css(dir, restore[dir]);
722+
var stashedProperty = selfCSSData.meta[dir + '_o'];
723+
if (stashedProperty) {
724+
restore[dir] = stashedProperty + valUnit;
725+
jQuery(this).css(dir, restore[dir]);
726+
}
724727
}
725728
}
726729
}

0 commit comments

Comments
 (0)