react-diagrams
react-diagrams copied to clipboard
Bidirectional Ports
Hi all,
I am considering to use react-diagrams for a certain use case. However, all the example's seem to have ports that are either input our output. Is it possible to create ports that are both input and output (on the same line)?
Thanks,
@grafandreas hey, have you figured this out? This sounds like basic functionality to me, yet i can't figure out how to do this
@grafandreas Hey, actually found solution for this https://github.com/projectstorm/react-diagrams/blob/23b174736c1858fa2ee5899505454bf1a408e1a7/docs/customizing/ports.md
This minimal example works
import { PortModel } from "@projectstorm/react-diagrams-core"
import { DefaultPortModel } from "@projectstorm/react-diagrams-defaults"
export class BidirectionalPortModel extends DefaultPortModel {
canLinkToPort(port: PortModel) {
return true
}
}