Created
March 15, 2013 22:30
-
-
Save diverted247/5173656 to your computer and use it in GitHub Desktop.
Event walking up a .manager hierarchy
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
walkManagerChain( manager:any , event:any ):void{ | |
while( true ){ | |
if( manager.hasOwnProperty( '_' + event.type ) ){ | |
manager[ '_' + event.type ]( event ); | |
} | |
if( manager.hasOwnProperty( 'manager' ) ){ | |
manager = manager.manager; | |
}else{ | |
return; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment