Closed Voodu closed 3 years ago
How about targetPosition and sourcePosition in the options?
That sounds good. They definitely shouldn't be mandatory. Center of the selector will be good enough in most cases, so putting them in the options is reasonable
Feature request
New
dragAndDrop
API is nice addition, but it's a bit limited. Precisely, it doesn't allow to specify, at which point should the draggable be grabbed and to which exact location in the container it should be dropped. It's necessary when drag and drop functionality is used for ex. sorting some items.Up to now, in my tests I was using custom implementation for drag and drop functionality which, apart from having
source
andtarget
arguments, provided also the ability for settinggrabPoint
anddropPoint
relative to the respective selectors bounding boxes.To give an idea, it works like that:
dragAndDrop itself
Point
classand can be used like that:
I think at least adding the ability to specify some sort of offset from the selector location would be very helpful for more precise drag and drop manipulation