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

How to bind custom action to events #26

Closed
euskalhenriko opened this issue Dec 4, 2018 · 2 comments
Closed

How to bind custom action to events #26

euskalhenriko opened this issue Dec 4, 2018 · 2 comments
Labels
question Further information is requested

Comments

@euskalhenriko
Copy link

euskalhenriko commented Dec 4, 2018

Hi, i recover this issue from theia-ide/sprotty repository: theia-ide/sprotty#240
My problem is a bit different: I have a Vue (not using TypeScript) project using sprotty to draw an Elk generated graph.
I have found various example to configure and use Sprotty but all use TypeScript, so, I used the Elk Graph Viewer sample to implement a "bridge" library in TypeScript that configure Sprotty and then I use it in Vue project, and it work well.
I have been able to implement the issue solution (implementing IActionHandler) in this "library" but I cannot figure how to "send" the action content back to the Vue project, or how to configure a custom function to handle the event from Vue project. Basically I only need the id of selected node(s)
Is it possible? There is some example for this?
Thank you very much for any help

@spoenemann
Copy link
Contributor

You can register an action handler to listen for specific action kinds, e.g. selection. You can do whatever you like inside the action handler implementation.

@spoenemann spoenemann added the question Further information is requested label Dec 5, 2018
@euskalhenriko
Copy link
Author

Thank Miro, I could do it with pure javascript finally

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

No branches or pull requests

2 participants