Skip to content

Commit

Permalink
Merge pull request aehlke#148 from nolanlawson/master
Browse files Browse the repository at this point in the history
"afterTagRemoved" not called at correct time if animating
  • Loading branch information
aehlke committed Mar 4, 2013
2 parents 2c65818 + 38bb8c2 commit 6da7950
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/tag-it.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,16 +500,18 @@
tag.addClass('removed'); // Excludes this tag from _tags.
var hide_args = this._effectExists('blind') ? ['blind', {direction: 'horizontal'}, 'fast'] : ['fast'];

var thisTag = this;
hide_args.push(function() {
tag.remove();
thisTag._trigger('afterTagRemoved', null, {tag: tag, tagLabel: thisTag.tagLabel(tag)});
});

tag.fadeOut('fast').hide.apply(tag, hide_args).dequeue();
} else {
tag.remove();
this._trigger('afterTagRemoved', null, {tag: tag, tagLabel: this.tagLabel(tag)});
}

this._trigger('afterTagRemoved', null, {tag: tag, tagLabel: this.tagLabel(tag)});
},

removeTagByLabel: function(tagLabel, animate) {
Expand Down

0 comments on commit 6da7950

Please sign in to comment.