From 53140ce958be62931c8a2cc42e2aaf8628be1fef Mon Sep 17 00:00:00 2001 From: brewster Date: Thu, 23 Jun 2016 12:57:32 -0700 Subject: [PATCH] 2.0.2_single_tile_fix --- CHANGELOG.md | 3 +++ lib/tiler.js | 3 +++ src/tiler.coffee | 1 + 3 files changed, 7 insertions(+) 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