diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f40247..3a10de5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ #### CHANGE LOG +###### 2.0.3 +* single tile support + ###### 2.0.2 * code refactor * added tests diff --git a/lib/tiler.js b/lib/tiler.js index f10cae5..4114bd4 100644 --- a/lib/tiler.js +++ b/lib/tiler.js @@ -114,6 +114,9 @@ }); this.$currentActiveTile.add(this.$currentPreviousTile).addClass(this._getAnimationClass(this.$currentActiveTile)); this.$currentActiveTile.addClass('active enter end'); + if (this.$currentPreviousTile[0] === this.$currentActiveTile[0]) { + return; + } this.$currentPreviousTile.addClass('previous exit end'); if (this.options.isReversible) { return this.$currentPreviousTile.addClass('reverse'); diff --git a/src/tiler.coffee b/src/tiler.coffee index 594a5d9..d9b4494 100644 --- a/src/tiler.coffee +++ b/src/tiler.coffee @@ -164,6 +164,7 @@ @$currentActiveTile.addClass 'active enter end' # Setup (fake) previous tile + return if @$currentPreviousTile[0] == @$currentActiveTile[0] @$currentPreviousTile.addClass 'previous exit end' @$currentPreviousTile.addClass 'reverse' if @options.isReversible