Created
December 7, 2012 10:10
-
-
Save marsch/4232288 to your computer and use it in GitHub Desktop.
options.check method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
options.check = (composition) -> | |
if composition.type is type | |
if _(composition.params).isEqual options.params | |
return true | |
else if composition.params?.forceInit | |
# so the view will be re-initialized everytime | |
return false | |
else | |
# trigger an event in the view that params have changed | |
# so views can handle the change on there own | |
composition.view.trigger('change:params', options.params) | |
return true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment