Skip to content
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

add onAfterEvent set of listeners #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AkramIzz
Copy link
Owner

They are called after all systems' onEvent listeners are called. Which is convenient for systems that depend on other systems.

This, however, has a major flaw. Let's say system A needs system B to be done processing an event before it can process it. The current implementation will only work if the event emitter isn't system B, because when system B is the emitter, it's onEvent is not called. System B handles the event after firing it, and thus after all the onEvent and onAfterEvent methods are called. See the visual system's addNode/addEdge for an example of this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant