You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With drag-select, the selection and drag functionality is really simple.
But, as far as I can see, when the user releases an item, there is no built-in way to return the dropped item(s) to where they came from?
It would be great if, on drop, we could return some data which would indicate to drag-select that the item can remain where it is, or must be returned back to where it came from.
As we are using the translate method of drag-positioning, at the moment, I just remove that style from the items being dragged - so that they are positioned where I want, not where drag-select offset them to. (doing drag-to-order, and the order of the elements change to set the final position, and any translate style that carries over would mess that up).
If there is a way to do this currently, perhaps update the documentation, or point me at the relevant method to achieve this?
The text was updated successfully, but these errors were encountered:
As to answer on how I'd do it, probably you could use DS:start to store the elements starting position and then on DS:end put them back to the stored location if they don't fullfil the criteria you deem necessary to be moved? As of now DragSelect does not store original positions of elements on start.
In regards to the feature request could you please elaborate what you'd like to achieve? Like when should the elements be put back at the original position on start and why?
With drag-select, the selection and drag functionality is really simple.
But, as far as I can see, when the user releases an item, there is no built-in way to return the dropped item(s) to where they came from?
It would be great if, on drop, we could return some data which would indicate to drag-select that the item can remain where it is, or must be returned back to where it came from.
As we are using the translate method of drag-positioning, at the moment, I just remove that style from the items being dragged - so that they are positioned where I want, not where drag-select offset them to. (doing drag-to-order, and the order of the elements change to set the final position, and any translate style that carries over would mess that up).
If there is a way to do this currently, perhaps update the documentation, or point me at the relevant method to achieve this?
The text was updated successfully, but these errors were encountered: