Skip to content

Commit a2d8adf

Browse files
committed
Fix bug in animated-binding
1 parent ce41cad commit a2d8adf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/animated-binding.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ Binding.extend(AnimatedBinding, {
104104
* Allow an element to use CSS3 transitions or animations to animate in or out of the page.
105105
*/
106106
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;
109109

110110
if (this.fragments.disableAnimations) {
111111
return callback.call(_this);
@@ -127,7 +127,7 @@ Binding.extend(AnimatedBinding, {
127127
if (this.animateObject[0] === '.') {
128128
className = this.animateObject.slice(1);
129129
} else if (this.animateObject) {
130-
animateObject = fragments.getAnimation(this.animateObject);
130+
animateObject = this.fragments.getAnimation(this.animateObject);
131131
if (typeof animateObject === 'function') animateObject = new animateObject(this);
132132
}
133133
}
@@ -160,7 +160,7 @@ Binding.extend(AnimatedBinding, {
160160
}
161161
if (typeof animateObject[methodAnimateName] === 'function') {
162162
node.classList.add(classAnimateName);
163-
var duration = getDuration.call(_this, node, direction);
163+
duration = getDuration.call(_this, node, direction);
164164
if (duration) {
165165
onAnimationEnd(node, duration, whenDone);
166166
} else {
@@ -173,7 +173,7 @@ Binding.extend(AnimatedBinding, {
173173
node.offsetWidth = node.offsetWidth;
174174
node.classList.remove(classWillName);
175175
node.classList.add(classAnimateName);
176-
var duration = getDuration.call(_this, node, direction);
176+
duration = getDuration.call(_this, node, direction);
177177
if (duration) {
178178
onAnimationEnd(node, duration, whenDone);
179179
} else {

0 commit comments

Comments
 (0)