Private method jQuery.setAuto in fx module is deprecated
This commit is contained in:
Brandon Aaron 2006-11-14 21:02:41 +00:00
parent 9261e7ee13
commit 044d47a504

View file

@ -364,34 +364,6 @@ jQuery.fn.extend({
jQuery.extend({ jQuery.extend({
setAuto: function(e,p) {
if ( e.notAuto ) return;
if ( p == "height" && e.scrollHeight != parseInt(jQuery.curCSS(e,p)) ) return;
if ( p == "width" && e.scrollWidth != parseInt(jQuery.curCSS(e,p)) ) return;
// Remember the original height
var a = e.style[p];
// Figure out the size of the height right now
var o = jQuery.curCSS(e,p,1);
if ( p == "height" && e.scrollHeight != o ||
p == "width" && e.scrollWidth != o ) return;
// Set the height to auto
e.style[p] = e.currentStyle ? "" : "auto";
// See what the size of "auto" is
var n = jQuery.curCSS(e,p,1);
// Revert back to the original size
if ( o != n && n != "auto" ) {
e.style[p] = a;
e.notAuto = true;
}
},
speed: function(s,o) { speed: function(s,o) {
o = o || {}; o = o || {};
@ -493,6 +465,8 @@ jQuery.extend({
// Remember where we started, so that we can go back to it later // Remember where we started, so that we can go back to it later
z.el.orig[prop] = this.cur(); z.el.orig[prop] = this.cur();
z.o.show = true;
// Begin the animation // Begin the animation
z.custom(0, z.el.orig[prop]); z.custom(0, z.el.orig[prop]);
@ -514,10 +488,6 @@ jQuery.extend({
z.custom(z.el.orig[prop], 0); z.custom(z.el.orig[prop], 0);
}; };
// Remember the overflow of the element
if ( !z.el.oldOverflow )
z.el.oldOverflow = jQuery.css( z.el, "overflow" );
// Make sure that nothing sneaks out // Make sure that nothing sneaks out
y.overflow = "hidden"; y.overflow = "hidden";
@ -542,25 +512,22 @@ jQuery.extend({
if ( done ) { if ( done ) {
// Reset the overflow // Reset the overflow
y.overflow = z.el.oldOverflow; y.overflow = '';
// Hide the element if the "hide" operation was done // Hide the element if the "hide" operation was done
if ( z.o.hide ) if ( z.o.hide )
y.display = 'none'; y.display = 'none';
// Otherwise reset the display property
else if ( z.o.show )
y.display = '';
// Reset the property, if the item has been hidden // Reset the properties, if the item has been hidden or shown
if ( z.o.hide ) { if ( z.o.hide || z.o.show )
for ( var p in z.el.curAnim ) { for ( var p in z.el.curAnim )
if (p == "opacity") if (p == "opacity")
jQuery.attr(y, p, z.el.orig[p]); jQuery.attr(y, p, z.el.orig[p]);
else else
y[ p ] = z.el.orig[p] + "px"; y[p] = '';
// set its height and/or width to auto
if ( p == 'height' || p == 'width' )
jQuery.setAuto( z.el, p );
}
}
} }
// If a callback was provided, execute it // If a callback was provided, execute it