Skip to content

Touch and pointer drags

Touch and pen drag every BdndDraggable through pointer events, since most touch browsers raise no native drag events: press a box for a moment, then drag it. These boxes set PointerDrag="BdndPointerDrag.All", so the mouse drags them the same way - a copy of the box follows the pointer, Escape cancels, and the tray scrolls while the pointer is near its top or bottom edge. The copy is styled through [data-bit-bdnd-preview]; the "info" corner is a data-bit-bdnd-no-drag region a press there never drags from.

Glass
Banana
Paper
Slot 1 empty
Slot 2 empty
Slot 3 empty
Slot 4 empty
Slot 5 empty
Slot 6 empty
Slot 7 empty
Slot 8 empty
Slot 9 empty
Slot 10 empty
Slot 11 empty
Slot 12 empty
Slot 13 empty
Slot 14 empty
Slot 15 empty
Slot 16 empty
Slot 17 empty
Slot 18 empty
Slot 19 empty
Slot 20 empty

Nothing put anywhere yet.

The boxes' parameters

PointerDrag

All: the mouse, touch and pen all drag through pointer events - a copy follows the pointer, and the drag stays in the page.

TouchDelay is how long a finger rests on a box before the drag starts (not on a BdndDragHandle, which drags at once): moving more than DragThreshold pixels before then gives the press up, so a swipe across the boxes still scrolls the page. The mouse and a pen on a handle start once they have moved DragThreshold pixels, so a click stays a click. AutoScroll lets a pointer drag scroll the innermost container under the pointer - the tray, here - or the page, faster the nearer its edge.
An unhandled error has occurred. Reload 🗙