projectstorm / react-diagrams

a super simple, no-nonsense diagramming library written in react that just works
https://projectstorm.cloud/react-diagrams
MIT License
8.46k stars 1.16k forks source link

Creating a link between two nodes, not their ports #912

Open mkhoussid opened 2 years ago

mkhoussid commented 2 years ago

Suppose I have two nodes, each with an arbitrary amount of ports. I'm trying to figure out if I can create a link between these two DefaultNodeModel components, not between their ports. It seems as though the link method only exists on DefaultPortModel.

Any ideas, am I missing something?

dylanvorster commented 2 years ago

setup a phantom port that spans the size of the node and implement custom links which offset the arrow so that they touch the border. I am doing this in my own project, I cant yet share the source code but I may add a similar demo in the project gallery.

malavshah-9 commented 1 year ago

@dylanvorster Demo added?