antonioru / antonioru/beautiful-react-diagrams
Unidirectional Dragging
- 主要言語
- JavaScript
- スター
- 2.7k
- フォーク
- 171
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
**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
コントリビューションガイド
評価
この issue はまだ評価されていません。