-
Notifications
You must be signed in to change notification settings - Fork 206
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
After animation event support on a per view basis #6
base: master
Are you sure you want to change the base?
Conversation
…ing the back button
any unbinding of events that may be needed. I also added support for browser back button support and to know what view you're hitting back from and wich you're going to. That info gets sent to the AppView router extension.
method. Made it too complex for no reason. Added view args to the back trigger event so that event handlers no the view we are currently navigating to.
I think the project owner would appreciate it if the pull-request did not change the indentation spacing from the original 2-space indent. Style preferences aside, it just makes it much harder to see exactly what you've changed, since the diff shows every line as changed. |
Thanks for the feedback -- I'll make those changes and re-submit and push those along soon. Should have checked... thanks. |
I've changed the indentation back to 2 spaces so the modification are much easier to see now. |
Thanks so much for the contributions and thanks for changing the tab width. First off, I have a couple of concerns with the code.
Do you mind clarifying a few things?
Again, I really appreciate the contribution and I apologize for being a bit harsh. Thank you. |
That wasn't harsh at all! I really appreciate the questions since it made me take a closer look at a couple things (I was modifying this code while trying to incorporate in a small project). I'll answer your questions in turn :-). First, your line comments!
The explanations:
I hope that answers your questions reasonably well -- again, I'd love to work through this with you to make it a little bit more robust. Thanks a lot for your input! |
…for a refresh scenario since the back button is defaulted to true. Do not want to trigger a back event on a refresh
Just to preface, I'm quite new to Backbone and js in general so feedback is very much appreciated :-).
I added very basic support for event triggering on a per-view basis. Currently, I was only concerned with triggering events on animation complete. My changes end up providing a very similar syntax to Jr.Navigator.navigate. In the Junior view initialization, I would type something similar to:
Edit:
I added support for a AppView router extension in order to dispose of zombie views and execute any close events that are needed. In addition, I added support for backAnimation complete event and now Jr.Navigator "knows" when were navigating back due to a browser back button push and the AppView router extension allows you to deal with the current view and the next view that we're navigating to.