@@ -104,8 +104,8 @@ Binding.extend(AnimatedBinding, {
104
104
* Allow an element to use CSS3 transitions or animations to animate in or out of the page.
105
105
*/
106
106
animateNode : function ( direction , node , callback ) {
107
- var animateObject , className , classAnimateName , classWillName , whenDone ,
108
- methodAnimateName , methodWillName , methodDidName , dir , _this = this ;
107
+ var animateObject , className , classAnimateName , classWillName , whenDone , duration ,
108
+ methodAnimateName , methodWillName , methodDidName , dir , _this = this ;
109
109
110
110
if ( this . fragments . disableAnimations ) {
111
111
return callback . call ( _this ) ;
@@ -127,7 +127,7 @@ Binding.extend(AnimatedBinding, {
127
127
if ( this . animateObject [ 0 ] === '.' ) {
128
128
className = this . animateObject . slice ( 1 ) ;
129
129
} else if ( this . animateObject ) {
130
- animateObject = fragments . getAnimation ( this . animateObject ) ;
130
+ animateObject = this . fragments . getAnimation ( this . animateObject ) ;
131
131
if ( typeof animateObject === 'function' ) animateObject = new animateObject ( this ) ;
132
132
}
133
133
}
@@ -160,7 +160,7 @@ Binding.extend(AnimatedBinding, {
160
160
}
161
161
if ( typeof animateObject [ methodAnimateName ] === 'function' ) {
162
162
node . classList . add ( classAnimateName ) ;
163
- var duration = getDuration . call ( _this , node , direction ) ;
163
+ duration = getDuration . call ( _this , node , direction ) ;
164
164
if ( duration ) {
165
165
onAnimationEnd ( node , duration , whenDone ) ;
166
166
} else {
@@ -173,7 +173,7 @@ Binding.extend(AnimatedBinding, {
173
173
node . offsetWidth = node . offsetWidth ;
174
174
node . classList . remove ( classWillName ) ;
175
175
node . classList . add ( classAnimateName ) ;
176
- var duration = getDuration . call ( _this , node , direction ) ;
176
+ duration = getDuration . call ( _this , node , direction ) ;
177
177
if ( duration ) {
178
178
onAnimationEnd ( node , duration , whenDone ) ;
179
179
} else {
0 commit comments