Skip to content

Commit

Permalink
fix(collection): trigger start event before any potential direction
Browse files Browse the repository at this point in the history
  • Loading branch information
yoannmoinet committed Dec 26, 2015
1 parent 790fa26 commit c5441fd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ Collection.prototype.processOnStart = function (evt) {
};
var nipple = self.getOrCreate(identifier, position);
var process = function (nip) {
// Trigger the start.
nip.trigger('start', nip);
self.trigger('start ' + nip.identifier + ':start', nip);

nip.show();
if (pressure > 0) {
self.pressureFn(evt, nip, nip.identifier);
Expand Down Expand Up @@ -281,8 +285,6 @@ Collection.prototype.processOnStart = function (evt) {
}
}

nipple.trigger('start', nipple);
self.trigger('start ' + nipple.identifier + ':start', nipple);
return nipple;
};

Expand Down

0 comments on commit c5441fd

Please sign in to comment.