PyWorkflowApp / visual-programming

A Python Visual Programming Workspace for Data Science
MIT License
31 stars 12 forks source link

Front end edge creation bug #74

Closed reddigari closed 4 years ago

reddigari commented 4 years ago

I just remembered this and wanted to record it before I forgot. The JS API method that creates links uses the getSourcePort and getTargetPort methods on the react-diagrams link model to get the node IDs for the edge creation endpoint. But these correspond to the port where the user started dragging and the port where they stopped, respectively, rather than the out- and in-ports. Meaning if someone drew a link backwards, the DiGraph edge would be backwards. We need to add a step to the JS API method that determines which of the two ports is of type out, and sets that as the first parameter in the API call.