react-beautiful-dnd icon indicating copy to clipboard operation
react-beautiful-dnd copied to clipboard

Adding axis lock

Open zeddash opened this issue 4 years ago • 3 comments

Fixes #538

lockedAxis and allowedDeviation properties on <Draggable /> restricting dragging to one axis but permitting some movement in the blocked axis.

The main counter point was that this library is meant to feel physical so outright blocking movement in one axis feels like you are interacting with software as not many physical things are "on rails". However sometimes you do just need to lock movement to one axis but given some allowed deviation along the blocked axis (for instance 40px deviation allows -40px to +40px along the blocked axis).

There is a slight problem that I've seen on previous external solutions where keyboard controls are forgotten about, locked axis shouldn't be used as an alternative to type.

zeddash avatar Aug 06 '21 17:08 zeddash

Hooray! All contributors have signed the CLA.

atlassian-cla-bot[bot] avatar Aug 06 '21 17:08 atlassian-cla-bot[bot]

@danieldelcore would love this feature when you get the time to review

quantizor avatar Nov 30 '22 22:11 quantizor

Bump

MibbitTom avatar Apr 12 '24 14:04 MibbitTom