Permalink
Browse files

Merge pull request #148 from nolanlawson/master

"afterTagRemoved" not called at correct time if animating
  • Loading branch information...
2 parents 2c65818 + 38bb8c2 commit 6da7950714bbb1c4acb57935138f33f747977b42 @aehlke committed Mar 4, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 js/tag-it.js
View
@@ -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) {

0 comments on commit 6da7950

Please sign in to comment.