Last active
August 29, 2015 13:56
-
-
Save JoshTheWanderer/9228055 to your computer and use it in GitHub Desktop.
Marionette view transtions
This file contains hidden or 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
| # Hide the element, then fade in. defer prevents choppiness | |
| onRender -> | |
| @$el.hide() | |
| _.defer _.bind @transitionIn, @ | |
| transitionIn: -> | |
| @$el.slideDown() | |
| # Override backbone remove method, then call it once we've finished the transition | |
| remove: -> | |
| parentRemove = _.bind -> | |
| Backbone.View::remove.call @ | |
| , @ | |
| @$el.slideUp 400, parentRemove |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment