Open karmaral opened 1 year ago
Reading the docs again I think it indeed makes sense to emphasize that. Maybe something like this?
If you provide a function you can customize the drag start logic as you please. When the user starts to drag an item this predicate function will be called on every pointer/touch/mousemove event until you return
true
orfalse
. If you returntrue
the item will begin to move whenever the item is dragged. If you returnfalse
the item will not be moved at all. You should returnundefined
if you want to keep the predicate in "pending" state. Note that after you have returnedtrue
orfalse
this function will not be called until the item is released and dragged again.
Yeah, that's much clearer!
Hello! The docs could be more explicit in regards to the return type of
dragStartPredicate
. Currently it saysI only realized this was implying that not returning true or false would re-run the function by examining the touch delay example.
Looking back I see there's just empty returns on the examples, but for at-a-glance reads, perhaps it would add value to have it more explicitly defined in the description.
Could be something as simple as highlighting until.
Do you agree? Or is it too fine grained?