antonioru / antonioru/beautiful-react-diagrams

Unidirectional Dragging

Offen
#116 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
2.7k
Forks
171
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.