-
Notifications
You must be signed in to change notification settings - Fork 39
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 eventListeners on connector #19
Comments
Hi @wulucxy Sorry for the late response. Right now a little held up with work. Will try to get to this in a weekend. |
I believe jsplumb has connection events as stated in this doc (https://jsplumbtoolkit.com/community/doc/events.html#connectionEvents). react-dag doesn't have a way to hook to node and connection events yet. I am not sure when I could get to this (may be this weekend?). If you have ideas, PRs welcome! |
It was easy enough just to create an onClick() in the Node* class itself so I don't know if it would be worth it. However, now I DO need to hook into node and connection events in order to return the json model for these. Maybe expose a method using a ref? Otherwise I was just thinking of inserting the whole DAG component code into my project and either using redux or lifting state up to get the connection and node models. |
@dnickersonMedhok Yes I was planning on adding node and connection events as props to the dag.
Can you elaborate a little on this? |
Short answer: I need for the parent component to be able to get the json model that DAG is using. Long answer: I'm doing a PoC for medical management where the user creates a workflow. The creation of the DAG graph is to model that workflow of a case through the system. So I'm using the node/connection model for more than just creating the DAG graph. BTW After 20 years in the business this is my first front end. So I'm learning as I go and I'd love to contribute...... as soon as I learn typescript:\ |
This is already possible via the
No worries :) Typescript is easy to learn if you are familiar with traditional statically typed languages. |
Hi @ajainarayanan,I have a question about how to bind eventListers on connector,like the above picture shows:
but as https://github.com/ajainarayanan/react-dag/blob/feature%2F2.0.0.alpha/src/dag.tsx#L164 shows,we can only bind eventListeners on Instance。
so how can I bind event on connector?
The text was updated successfully, but these errors were encountered: