New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raise an event when all views in a given selector are closed #454
Conversation
Please follow the existing code style and do not add your own. See: https://github.com/tbranyen/backbone.layoutmanager/blob/master/CONTRIBUTING.md#code-style |
Looks good otherwise 👍 |
ok. Will fix the same |
// If the managers match, splice off this View. | ||
if (view && view.__manager__ === manager) { | ||
aSplice.call(parentViews, i, 1); | ||
} | ||
}); | ||
if (_.isEmpty(parentViews)){ | ||
manager.parent.trigger("removedLastViewForSelector", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use 2 space soft tabs, please adjust.
// If the managers match, splice off this View. | ||
if (view && view.__manager__ === manager) { | ||
aSplice.call(parentViews, i, 1); | ||
} | ||
}); | ||
if (_.isEmpty(parentViews)) { | ||
manager.parent.trigger("removedLastViewForSelector", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would a better event name be empty
?
manager.parent.trigger("empty");
//...
view.on("empty", function(selector) {
});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it. Little less speaking but think it covers what happened.
Awesome, once those changes are done, I think it's good to go, but I'd like a second look from @STRML @SBoudrias @jugglinmike or @ssafejava. |
Ok. Lets see what they think about it. |
wrote initial documentation: |
@gjlubbertsen Might want to hold off on modifying the wiki at least until it lands. Or even better: until we release a new version. |
Fine. |
reverted it: list here for reference.
|
When can we expect it to board the master ? |
Raise an event when all views in a given selector are closed
Right now ;-) |
Thanks! When do we post the documentation changes? |
Pull request for fix for issue:
https://github.com/tbranyen/backbone.layoutmanager/issues/453