Skip to content

Commit 0ca0cc5

Browse files
committed
Effects Rewrite: ensure fold and blind animate the placeholder
1 parent 766afa3 commit 0ca0cc5

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

ui/effect-blind.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,17 @@ return $.effects.define( "blind", "hide", function( o, done ) {
4646

4747
if ( show ) {
4848
el.cssClip( animate.clip );
49+
if ( placeholder ) {
50+
placeholder.css( animate.clip );
51+
}
52+
4953
animate.clip = start;
5054
}
5155

56+
if ( placeholder ) {
57+
placeholder.animate( animate.clip, o.duration, o.easing );
58+
}
59+
5260
el.animate( animate, {
5361
queue: false,
5462
duration: o.duration,

ui/effect-fold.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,24 @@ return $.effects.define( "fold", "hide", function( o, done ) {
6262

6363
if ( show ) {
6464
el.cssClip( animation2.clip );
65+
if ( placeholder ) {
66+
placeholder.css( animation2.clip );
67+
}
68+
6569
animation2.clip = start;
6670
}
6771

6872
// Animate
6973
el
74+
.queue(function(next) {
75+
if ( placeholder ) {
76+
placeholder
77+
.animate( animation1.clip, duration, o.easing )
78+
.animate( animation2.clip, duration, o.easing );
79+
}
80+
81+
next();
82+
})
7083
.animate( animation1, duration, o.easing )
7184
.animate( animation2, duration, o.easing )
7285
.queue(function() {
@@ -82,7 +95,7 @@ return $.effects.define( "fold", "hide", function( o, done ) {
8295
// inject all the animations we just queued to be first in line (after "inprogress")
8396
if ( queuelen > 1) {
8497
queue.splice.apply( queue,
85-
[ 1, 0 ].concat( queue.splice( queuelen, 3 ) ) );
98+
[ 1, 0 ].concat( queue.splice( queuelen, 4 ) ) );
8699
}
87100
el.dequeue();
88101
});

0 commit comments

Comments
 (0)