awslabs / diagram-maker

A library to display an interactive editor for any graph-like data.
https://awslabs.github.io/diagram-maker
Apache License 2.0
2.4k stars 137 forks source link

Is it possible to add custom number of Connectors for Nodes? #67

Closed rahul-codeb closed 2 years ago

rahul-codeb commented 3 years ago

Hi, I'm finding difficulty to manage custom number of connectors to the nodes. Right now, Diagram-Maker Nodes only support (one input and one output).

Also, please let us know, if it is possible to create custom-standard nodes in diagram maker.

occhangg commented 3 years ago

Apologies for the delay in our response and thank you for reaching out.

Could you please expand more on your use case?

rahul-codeb commented 3 years ago

I want to implement custom number to Left-Right-Rectangular Node, and the connector behaviour should be completely configurable (Dropzone / Draggable).

Expectations : image

Please, let me know if this is possible, and if possible please provide a demo code.

Thanks.

NorbertNader commented 3 years ago

Hey @notsonoobiee we currently do not have plans to support adding multiple node inputs/outputs. Would you be willing to contribute a code change to support this?

nkev commented 2 years ago

@NorbertNader I don't understand why you would not even plan adding multiple inputs/outputs to nodes.

It's the most basic functionality and the first thing anyone is going to ask for when building something a little more complex than a single input and output, right?

sameergoyal commented 2 years ago

You can add multiple inputs & outputs already by just adding the right data attributes. See the relevant documentation around it: https://awslabs.github.io/diagram-maker/usage/declarative.html#customizing-the-node-connectors.

However, what's currently not possible is for edges to start & end at these "custom" connectors. That feature would need to be added.

ktsao565 commented 2 years ago

I'm going to try and give this a shot and submit a PR.

diehbria commented 2 years ago

@nkev I would like to clarify, there is no plans for the maintainers to actively create this feature, not that we would not accept this feature as a contribution. We would be happy to accept this feature. We are in communications with another user of this library, @tsao565 who is interested in implementing this. Stay tuned :-)

nkev commented 2 years ago

Thanks @diehbria but I have since moved on to using drawflow, which better suits my needs.

tracy-french commented 2 years ago

Sorry, we are not planning to act on this request in any timely manner and will be closing this issue. Thank you.