Created
September 20, 2017 02:05
-
-
Save o0101/4288fe23c0287e49e6cbac4d4ac27860 to your computer and use it in GitHub Desktop.
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
/** | |
Example of component api idea | |
**/ | |
component1.api = { | |
add_sel() | |
del_sel() | |
generalize() | |
}; | |
component2.api = { | |
track_sel() | |
untrack_sel() | |
} | |
orchestrator = { | |
onMessage( m ) { | |
if ( m.type == 'add_sel' ) { | |
component2.send_message( { type : 'track_sel', sel: m.sel } ); | |
} | |
} | |
} | |
// etc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment