nowthis / sankeymatic

Make Beautiful Flow Diagrams
http://sankeymatic.com/build/
ISC License
843 stars 122 forks source link

Let users restrict node-dragging to vertical or horizontal #22

Closed nowthis closed 2 years ago

nowthis commented 8 years ago

Enabling horizontal dragging of nodes was a mixed blessing; users may want to preserve the exact horizontal spacing they already have without risking putting something out of position.

Add a checkbox which makes the draggability of nodes only work in a vertical way.

(Will combine well with issue #11, which will make it unnecessary to move nodes horizontally to make a graph compact.)

nowthis commented 8 years ago

Possibly useful unicode characters: ↔ ↕

nowthis commented 8 years ago

Modified the description to also allow for horizontal-only dragging, in case a user wants to keep the relations/distances between some nodes constant while moving the nodes sideways within the graph.

I don't think this will add much difficulty to the task.

nowthis commented 3 years ago

Other improvements to syntax and layout control will be more useful than this enhancement to the live rearrangement of a diagram, so I'm giving this a low-priority label.

nowthis commented 2 years ago

Instead of using the idea above (a checkbox to indicate whether the drag direction should be constrained), I'll take a page from popular image editors and check if the user has the Shift key down.

If so, the node will only move in either a strictly horizontal or strictly vertical fashion.