mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Effects: Making sure outerHeight and outerWidth make it through to the .size() implementation in all cases - Fixes IE8 effects failure
This commit is contained in:
parent
d3bc471688
commit
a217bd3b16
31
ui/jquery.ui.effect-scale.js
vendored
31
ui/jquery.ui.effect-scale.js
vendored
@ -21,7 +21,9 @@ $.effects.effect.puff = function( o, done ) {
|
|||||||
factor = percent / 100,
|
factor = percent / 100,
|
||||||
original = {
|
original = {
|
||||||
height: elem.height(),
|
height: elem.height(),
|
||||||
width: elem.width()
|
width: elem.width(),
|
||||||
|
outerHeight: elem.outerHeight(),
|
||||||
|
outerWidth: elem.outerWidth()
|
||||||
};
|
};
|
||||||
|
|
||||||
$.extend( o, {
|
$.extend( o, {
|
||||||
@ -35,7 +37,9 @@ $.effects.effect.puff = function( o, done ) {
|
|||||||
original :
|
original :
|
||||||
{
|
{
|
||||||
height: original.height * factor,
|
height: original.height * factor,
|
||||||
width: original.width * factor
|
width: original.width * factor,
|
||||||
|
outerHeight: original.outerHeight * factor,
|
||||||
|
outerWidth: original.outerWidth * factor
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -74,7 +78,12 @@ $.effects.effect.scale = function( o, done ) {
|
|||||||
options.restore = true;
|
options.restore = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
options.from = o.from || ( mode === "show" ? { height: 0, width: 0 } : original );
|
options.from = o.from || ( mode === "show" ? {
|
||||||
|
height: 0,
|
||||||
|
width: 0,
|
||||||
|
outerHeight: 0,
|
||||||
|
outerWidth: 0
|
||||||
|
} : original );
|
||||||
options.to = {
|
options.to = {
|
||||||
height: original.height * factor.y,
|
height: original.height * factor.y,
|
||||||
width: original.width * factor.x,
|
width: original.width * factor.x,
|
||||||
@ -124,7 +133,9 @@ $.effects.effect.size = function( o, done ) {
|
|||||||
props = restore ? props0 : props1,
|
props = restore ? props0 : props1,
|
||||||
zero = {
|
zero = {
|
||||||
height: 0,
|
height: 0,
|
||||||
width: 0
|
width: 0,
|
||||||
|
outerHeight: 0,
|
||||||
|
outerWidth: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
if ( mode === "show" ) {
|
if ( mode === "show" ) {
|
||||||
@ -213,7 +224,9 @@ $.effects.effect.size = function( o, done ) {
|
|||||||
var child = $( this ),
|
var child = $( this ),
|
||||||
c_original = {
|
c_original = {
|
||||||
height: child.height(),
|
height: child.height(),
|
||||||
width: child.width()
|
width: child.width(),
|
||||||
|
outerHeight: child.outerHeight(),
|
||||||
|
outerWidth: child.outerWidth()
|
||||||
};
|
};
|
||||||
if (restore) {
|
if (restore) {
|
||||||
$.effects.save(child, props2);
|
$.effects.save(child, props2);
|
||||||
@ -221,11 +234,15 @@ $.effects.effect.size = function( o, done ) {
|
|||||||
|
|
||||||
child.from = {
|
child.from = {
|
||||||
height: c_original.height * factor.from.y,
|
height: c_original.height * factor.from.y,
|
||||||
width: c_original.width * factor.from.x
|
width: c_original.width * factor.from.x,
|
||||||
|
outerHeight: c_original.outerHeight * factor.from.y,
|
||||||
|
outerWidth: c_original.outerWidth * factor.from.x
|
||||||
};
|
};
|
||||||
child.to = {
|
child.to = {
|
||||||
height: c_original.height * factor.to.y,
|
height: c_original.height * factor.to.y,
|
||||||
width: c_original.width * factor.to.x
|
width: c_original.width * factor.to.x,
|
||||||
|
outerHeight: c_original.height * factor.to.y,
|
||||||
|
outerWidth: c_original.width * factor.to.x
|
||||||
};
|
};
|
||||||
|
|
||||||
// Vertical props scaling
|
// Vertical props scaling
|
||||||
|
Loading…
Reference in New Issue
Block a user