Dragging » Min and Max
Min and Max

Instead of setting dragConstraints
, you can add min
and max
values to dragTransition
. This has the same effect.
So instead of writing this:
… you can also write this:
But you see the limitation: The min
value stands for both left
and top
. And the same is true for max
: it defines the constraints for both the right
and bottom
. So you can only use them when the draggable element is allowed to move an equal distance in those directions.