walmartlabs/thorax — pull request #81 by eastridge (2012-12-21 00:09:36+00:00)
Title: Add activate & deactivate methods

Note that this PR is meant for discussion purposes and is not ready to be merged yet. Summary:

- removed `freeze`
- added `activate`
- added `deactivate`
- override `remove` to call `deactivate`

Once the backbone-0.9.9 branch is merged into master will more behaviors:

- `activate` will bind / models and collections if not bound (if one had deactivated a view)
- `deactivate` will call `stopListening` on all bound models and collections
- `destroy` will unbind all models / collections

Questions:

- `undelegateEvents` is no longer called, should it be re-added to destroy? Does not seem appropriate for `deactivate` as an unattached `el` should not receive any DOM events and allows for an easier re-`activate`
- what problems will `activate` and `deactivate` propagating to children cause?