mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Effects: Blind effect bugfix - Pull Request #563 - No Ticket
This commit is contained in:
parent
85348eeebe
commit
48659c643f
10
ui/jquery.effects.blind.js
vendored
10
ui/jquery.effects.blind.js
vendored
@ -27,7 +27,7 @@ $.effects.effect.blind = function( o, done ) {
|
|||||||
motion = rpositivemotion.test( direction ),
|
motion = rpositivemotion.test( direction ),
|
||||||
animation = {},
|
animation = {},
|
||||||
show = mode === "show",
|
show = mode === "show",
|
||||||
wrapper, distance;
|
wrapper, distance, margin;
|
||||||
|
|
||||||
// if already wrapped, the wrapper's properties are my property. #6245
|
// if already wrapped, the wrapper's properties are my property. #6245
|
||||||
if ( el.parent().is( ".ui-effects-wrapper" ) ) {
|
if ( el.parent().is( ".ui-effects-wrapper" ) ) {
|
||||||
@ -41,21 +41,23 @@ $.effects.effect.blind = function( o, done ) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
distance = wrapper[ ref ]();
|
distance = wrapper[ ref ]();
|
||||||
|
margin = parseInt(wrapper.css(ref2));
|
||||||
|
|
||||||
animation[ ref ] = show ? distance : 0;
|
animation[ ref ] = show ? distance : 0;
|
||||||
if ( !motion ) {
|
if ( !motion ) {
|
||||||
el
|
el
|
||||||
.css( vertical ? "bottom" : "right", 0 )
|
.css( vertical ? "bottom" : "right", 0 )
|
||||||
.css( vertical ? "top" : "left", "" )
|
.css( vertical ? "top" : "left", "auto" )
|
||||||
.css({ position: "absolute" });
|
.css({ position: "absolute" });
|
||||||
animation[ ref2 ] = show ? 0 : distance;
|
|
||||||
|
animation[ ref2 ] = show ? margin : distance + margin;
|
||||||
}
|
}
|
||||||
|
|
||||||
// start at 0 if we are showing
|
// start at 0 if we are showing
|
||||||
if ( show ) {
|
if ( show ) {
|
||||||
wrapper.css( ref, 0 );
|
wrapper.css( ref, 0 );
|
||||||
if ( ! motion ) {
|
if ( ! motion ) {
|
||||||
wrapper.css( ref2, distance );
|
wrapper.css( ref2, margin + distance );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user