Table of Contents

Class DndSortable

Namespace
Velvet
Assembly
Velvet.Docs.dll

Helpers of dnd-kit's @dnd-kit/sortable.

public static class DndSortable
Inheritance
object
DndSortable

Fields

KeyboardCoordinates

dnd-kit's sortableKeyboardCoordinates, for DndKeyboardSensor: an arrow key moves the drag onto the nearest droppable in its direction, by the corners of the rects, passing over the one the drag is already over. Items of one context after the dragged one are met at their far edge.

Methods

ArrayMove<T>(IReadOnlyList<T>, int, int)

Returns a copy of items with the item at from moved to to, dnd-kit's arrayMove. A negative to counts from the end.

ArraySwap<T>(IReadOnlyList<T>, int, int)

Returns a copy of items with the items at from and to swapped, dnd-kit's arraySwap.