-
Notifications
You must be signed in to change notification settings - Fork 418
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
Be Able to Avoid Endless Loop When Listening for and Firing Same Event #525
Comments
I'm not sure if this is something we should solve / support in an elegant way on the Solely from the API perspective, this looks like expected behavior to me: If I fire |
I'm not saying we should solve this in the event bus. This issue is simply meant to start the discussion. 😉 |
What is the concrete instance of that problem? I guess, looking into bpmn-io/align-to-origin#2 it is the fact that you cannot safe the diagram on |
Yes, this is the original issue. There is no way of listening to the diagram has changed to export it when using the align-to-origin module. |
Let's close this one. Now that #524 is closed a simple way to achieve this is:
In the above case |
Listening for an event and firing that same event in the callback will result in an endless loop:
Currently, the only way to prevent this is to stop and start listening again in the callback:
There should be a more elegant way of avoiding this kind of situation. Sometimes the user might not be aware that the event he is listening for is fired through the callback.
Related #524
The text was updated successfully, but these errors were encountered: