cuprite icon indicating copy to clipboard operation
cuprite copied to clipboard

Add delay to dragging

Open trobrock opened this issue 1 year ago • 0 comments

I'm using SortableJS, which supports the ability to require the mouse be held for a period of time (in our case 300ms) before the user can drag the element.

Inspired by @swanson's work on #182 this adds the ability to add a delay between the mouse press and the drag.

This patch got our code off our custom drag_to method and onto this libraries. Usage is like this:

find(from).drag_to(find(to), steps: 10, delay: 0.3)

trobrock avatar Feb 09 '24 14:02 trobrock