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

Help needed "Target Size" #428

Open
AndyPandy123123 opened this issue May 11, 2018 · 3 comments
Open

Help needed "Target Size" #428

AndyPandy123123 opened this issue May 11, 2018 · 3 comments
Labels
feature New feature or enhancement help wanted

Comments

@AndyPandy123123
Copy link

How can I change the target size? At the moent im am only able to drop near or on an existing target object.

@AndyPandy123123 AndyPandy123123 changed the title Target Size Help needed "Target Size" May 11, 2018
@lukasoppermann
Copy link
Owner

Can you elaborate on what you mean by "target"? You can only drop items within a sortable. If you add padding to the sortable or give it a fixed min-height you should be able to drop it on there.

@AndyPandy123123
Copy link
Author

AndyPandy123123 commented May 11, 2018

Verfügbare Knöpfe
<ul class="js-sortable-source" id="dragtarget">
my source
</ul>

Aktive Knöpfe
<ul class="js-sortable-target sortable" id="droptarget">
my target
</ul>

Now when I try to drop in the target area I have to drop the items on or near an existing target element. I cant drop underneath an existing target element. That is my issue.

@lukasoppermann
Copy link
Owner

Now I get it, this does not work sadly.

It would require us to fire the event when entering the sortable event if it has items and than checking if it is above or below all list items and than adding it accordingly.

The lines that are dealing with it are those: https://github.com/lukasoppermann/html5sortable/blob/master/src/html5sortable.ts#L466-L530

If you are interested in sending in a PR to improve this, I would be very happy.

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

No branches or pull requests

2 participants