MrBlenny / react-flow-chart

🌊 A flexible, stateless, declarative flow chart library for react.
https://mrblenny.github.io/react-flow-chart/index.html
MIT License
1.46k stars 307 forks source link

How can we display port on custom position? #69

Closed ImranBinShoukat closed 4 years ago

ImranBinShoukat commented 4 years ago

I want to do something like this:

ports: {
  port1: {
    id: 'port1',
    type: 'left',
    position: {
      x: 50,
      y: 75
    }
  }
}

But it ignores the position and displays port on left side of the node. Is there a way to display port on specified position?

krashdifferent commented 4 years ago

I believe the only way to give custom port positions is to override the Ports component with a custom component passed to the Components prop of the flow chart. You can check out the default Ports and PortsGroup components for how to make these.