Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap in list only when element is completely covered #20

Open
Gnopps opened this issue May 8, 2020 · 2 comments
Open

Swap in list only when element is completely covered #20

Gnopps opened this issue May 8, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@Gnopps
Copy link

Gnopps commented May 8, 2020

Thanks for your effort with this library!

Is it possible to change the threshold of when two items should swap places?

In the image below "2" is being dragged upwards towards "b". I'd like "b" and "2" to swap places only once "2" completely (or almost completely) covers "b" vertically (instead of when it covers for example 50% which is what I believe it is now).

image

Is this possible to accomplish?

@rlemaigre rlemaigre added the enhancement New feature or request label Jul 9, 2020
@ddenev
Copy link

ddenev commented Aug 28, 2020

I believe swapping is based not on coverage but on the mouse position and its distance to elements - the element which is closest to the current mouse position wins and is swapped with the dragged element. The distance is usually measured to the center of the element.

@rlemaigre
Copy link
Owner

That's right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants