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

[QUESTION] drag element to inside other dont wrok #1487

Closed
krubenrc opened this issue Apr 11, 2019 · 6 comments
Closed

[QUESTION] drag element to inside other dont wrok #1487

krubenrc opened this issue Apr 11, 2019 · 6 comments
Labels

Comments

@krubenrc
Copy link

krubenrc commented Apr 11, 2019

Hello, when i trie drag an element and drop it inside other, like nested sortable, it dont work.

I attach a video, where you can see the problem, im newbie in this project, and i dont know all features and options, but i've searched in issues and i dont found nothing, i hope you can help me pls.

At the beginning, I take out the blocks and I can put them in, but when the main block does not have any inside, I can not put any blocks.

ezgif-4-1fdafc253b92

@owen-m1
Copy link
Member

owen-m1 commented Apr 11, 2019

@krubenrc Some of those items have containers to hold items inside them, but the others do not, so you can only insert items inside items that used to have other items in them as these have the nested containers. Also, it seems that when you try to put an item back inside one of these nested containers when it's empty it's triggering a swap rather than insertion into the container. To get around this you need to increase the emptyInsertThreshold option.

@krubenrc
Copy link
Author

I tried in local with emptyInsertThreshold in 1 and 1000 and nothing :(

https://codepen.io/krubenrc/pen/axWYqz
ezgif-4-28ff9d67d211

@owen-m1
Copy link
Member

owen-m1 commented Apr 11, 2019

@krubenrc I set it to 10 and it works fine. Try only dragging in from the bottom. Also maybe reduce the swapThreshold, or even better set invertSwap:true.

@krubenrc
Copy link
Author

image
image

:( dont work for me, i dont know why...

@owen-m1
Copy link
Member

owen-m1 commented Apr 12, 2019

@krubenrc Solved in commit 6f7fc27.

@krubenrc
Copy link
Author

It works! Thank you very much!

Although from above works some strange , but from below it's great

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

No branches or pull requests

2 participants