You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the solution you'd like
I'm creating a data import tool that will allow users to import CSV data from somewhere else that might not necessarily have the same headers, or that might need to transform their data somehow before it can be imported. I'm using beautiful-react-digrams to create a visual interface for defining the mapping of the source data fields to the destination data fields. The source and destination fields should be fixed on the left and right side of the Diagram Canvas respecitvely, but their vertical order can be changed.
For this I'd like to be able to restrict the dragging on the node objects to the 'Y' axis.
Describe alternatives you've considered
I could re-implement the drag functionality in my custom node render components, but then I'd have to import the internal_hook useDrag which seems sort of hackish. Also, since I'm copying the code pretty much directly from DiagramNode.js, it seems redundant.
Describe the solution you'd like
I'm creating a data import tool that will allow users to import CSV data from somewhere else that might not necessarily have the same headers, or that might need to transform their data somehow before it can be imported. I'm using beautiful-react-digrams to create a visual interface for defining the mapping of the source data fields to the destination data fields. The source and destination fields should be fixed on the left and right side of the Diagram Canvas respecitvely, but their vertical order can be changed.
For this I'd like to be able to restrict the dragging on the node objects to the 'Y' axis.
Describe alternatives you've considered
I could re-implement the drag functionality in my custom node render components, but then I'd have to import the internal_hook
useDrag
which seems sort of hackish. Also, since I'm copying the code pretty much directly from DiagramNode.js, it seems redundant.Additional context
I forked this repo and created a PR in the forked repo with the implementation of this feature: https://github.com/mstone121/beautiful-react-diagrams/pull/1
The text was updated successfully, but these errors were encountered: