Guest User

Untitled

a guest
Jun 15th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   function closeSection() {
  2.     // A section is opened or opening. Try to cancel the opening transition first.
  3.     this.openSectionTransition.cancel();
  4.  
  5.     // Run the actual close transition.
  6.     this.closeSectionTransition =
  7.         this.openSectionTransition.finished.then(function() {
  8.           // The section already finished opening; close it.
  9.           return new CloseSectionTransition();
  10.         }, function() {
  11.           // Cool, the opening was successfully canceled! Do nothing.
  12.           return null;
  13.         });
  14.   }
Advertisement
Add Comment
Please, Sign In to add comment