Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function closeSection() {
- // A section is opened or opening. Try to cancel the opening transition first.
- this.openSectionTransition.cancel();
- // Run the actual close transition.
- this.closeSectionTransition =
- this.openSectionTransition.finished.then(function() {
- // The section already finished opening; close it.
- return new CloseSectionTransition();
- }, function() {
- // Cool, the opening was successfully canceled! Do nothing.
- return null;
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment