Minor Changes
-
79f6088
#144 Thanks @clauderic! - Allow consumers to determine whether to animate layout changes and when to measure nodes. Consumers can now use theanimateLayoutChanges
prop ofuseSortable
to determine whether layout animations should occur. Consumers can now also decide when to measure layouts, and at what frequency using thelayoutMeasuring
prop ofDndContext
. By default,DndContext
will measure layouts just-in-time after sorting has begun. Consumers can override this behaviour to either only measure before dragging begins (on mount and after dragging), or always (on mount, before dragging, after dragging). Pairing thelayoutMeasuring
prop onDndContext
and theanimateLayoutChanges
prop ofuseSortable
opens up a number of new possibilities for consumers, such as animating insertion and removal of items in a sortable list. -
a76cd5a
#136 Thanks @clauderic! - AddedonActivation
option to sensors. Delegated the responsibility of callingevent.preventDefault()
on activation to consumers, as consumers have the most context to decide whether it is appropriate or not to prevent the default browser behaviour on activation. Consumers of the sensors can prevent the default behaviour on activation using theonActivation
option. Here is an example using the Pointer sensor:useSensor(PointerSensor, {onActivation: (event) => event.preventDefault()})
Patch Changes
adb7bd5
#151 Thanks @clauderic! -DragOverlay
now attempts to perform drop animation even iftransform.x
andtransform.y
are both zero.