Skip to content

Commit

Permalink
Added support so the animation won't go out side of the document size
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesper Lindstroem Nielsen authored and Jesper Lindstroem Nielsen committed May 15, 2011
1 parent d67e905 commit ab5a579
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion ui/jquery.effects.split.js
Expand Up @@ -53,6 +53,18 @@

container.css( "overflow", o.crop ? "hidden" : "visible" );

//Makes another container so the animations won't overflow the document size if crop not used
if ( !o.crop ) {
container = container.wrap( "<div></div>" ).parent().css( {
position: 'absolute',
top: 0,
left: 0,
width: $ ( document ).width( ),
height: $ ( document ).height( ),
overflow: 'hidden'
} );
}

//Make animation
for ( i = 0; i < o.rows; i++ ) {
for ( j = 0; j < o.columns; j++ ) {
Expand All @@ -78,7 +90,9 @@
} else {
el.hide();
}
container.detach();

container.remove( );

if ( $.isFunction( o.complete ) ) {
o.complete.apply( el[ 0 ] );
}
Expand Down

1 comment on commit ab5a579

@gnarf
Copy link

@gnarf gnarf commented on ab5a579 May 15, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering the issues you brought up with this approach, lets just revert this commit and then worry about it after we get the main part of the effects pulled in

Please sign in to comment.