Skip to content

Commit

Permalink
Fixes issue #2 by forcing reflow if the in and out animation are the …
Browse files Browse the repository at this point in the history
…same
  • Loading branch information
MrSaints committed Jan 17, 2015
1 parent 7764fe8 commit f3f3105
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Morphist",
"version": "2.0.0",
"version": "2.0.1",
"description": "A simple, high-performance and cross-browser jQuery slider / slideshow / carousel plugin for child objects powered by Animate.css.",
"authors": [
"Ian Lai <ian@fyianlai.com>"
Expand Down
9 changes: 6 additions & 3 deletions dist/morphist.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,12 @@
.addClass("animated " + this.settings.animateIn);
},
_animateOut: function () {
return this.children.eq(this.index)
.removeClass()
.addClass("animated " + this.settings.animateOut);
var element = this.children.eq(this.index);
element.removeClass();
if (this.settings.animateIn === this.settings.animateOut) {
element[0].offsetWidth = element[0].offsetWidth;
}
return element.addClass("animated " + this.settings.animateOut);
}
};

Expand Down
2 changes: 1 addition & 1 deletion dist/morphist.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Morphist",
"version": "2.0.0",
"version": "2.0.1",
"description": "A simple, high-performance and cross-browser jQuery slider / slideshow / carousel plugin for child objects powered by Animate.css.",
"main": "Gruntfile.coffee",
"private": true,
Expand Down

0 comments on commit f3f3105

Please sign in to comment.