@@ -150,16 +150,15 @@ class QueueAnim extends React.Component {
150
150
}
151
151
152
152
performEnter ( key , i ) {
153
- /* const placeholderNode = findDOMNode(this.refs[placeholderKeyPrefix + key]);
154
- if (!placeholderNode) {
155
- return;
156
- }*/
153
+ /*
154
+ const placeholderNode = this.placeholder[key] || document.createElement('div');//findDOMNode(this.refs[placeholderKeyPrefix + key]);
155
+ this.placeholder[key] = placeholderNode*/
157
156
158
157
const interval = transformArguments ( this . props . interval , key , i ) [ 0 ] ;
159
158
const delay = transformArguments ( this . props . delay , key , i ) [ 0 ] ;
160
159
/*
161
160
placeholderNode.style.visibility = 'hidden';
162
- velocity(placeholderNode, 'stop', true );
161
+ velocity(placeholderNode, 'stop');
163
162
velocity(placeholderNode, {opacity: [0, 0]}, {
164
163
delay: interval * i + delay,
165
164
duration: 0,
@@ -174,10 +173,6 @@ class QueueAnim extends React.Component {
174
173
performEnterBegin ( key , i ) {
175
174
const childrenShow = this . state . childrenShow ;
176
175
childrenShow [ key ] = true ;
177
- /*
178
- *这里会报错,用_reactInternalInstance来分别出这个组件还存在否,
179
- * componentWillUnmount能去掉所有的setState吗?这里有延时处理...
180
- */
181
176
if ( this . _reactInternalInstance ) {
182
177
this . setState ( { childrenShow} , this . realPerformEnter . bind ( this , key , i ) ) ;
183
178
}
@@ -191,6 +186,7 @@ class QueueAnim extends React.Component {
191
186
const duration = transformArguments ( this . props . duration , key , i ) [ 0 ] ;
192
187
node . style . visibility = 'hidden' ;
193
188
velocity ( node , 'stop' ) ;
189
+ console . log ( 'enter' , key ) ;
194
190
velocity ( node , this . getVelocityEnterConfig ( key , i ) , {
195
191
duration : duration ,
196
192
easing : this . getVelocityEasing ( key , i ) [ 0 ] ,
@@ -202,10 +198,10 @@ class QueueAnim extends React.Component {
202
198
203
199
performLeave ( key , i ) {
204
200
const node = findDOMNode ( this . refs [ key ] ) ;
201
+ // console.log('stop', key);
205
202
/*
206
- this.placeholder.forEach((item)=> {
207
- velocity(item, 'stop', true);
208
- });*/
203
+ velocity(this.placeholder[key], 'stop');
204
+ */
209
205
clearTimeout ( this . placeholder [ key ] ) ;
210
206
if ( ! node ) {
211
207
return ;
@@ -214,7 +210,8 @@ class QueueAnim extends React.Component {
214
210
const delay = transformArguments ( this . props . delay , key , i ) [ 1 ] ;
215
211
const duration = transformArguments ( this . props . duration , key , i ) [ 1 ] ;
216
212
const order = this . props . leaveReverse ? ( this . keysToLeave . length - i - 1 ) : i ;
217
- velocity ( node , 'stop' , true ) ;
213
+ velocity ( node , 'stop' ) ;
214
+ // console.log('leave', key);
218
215
velocity ( node , this . getVelocityLeaveConfig ( key , i ) , {
219
216
delay : interval * order + delay ,
220
217
duration : duration ,
0 commit comments