-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Only allow one element to drop #230
Comments
Hi, I'm interested in this topic too. Any info on how to achieve that? |
Try removing the container from drake.containers after it has something dropped on it You could also set an attribute like |
Thanks for the reply ben. The first solution could work but in my case I need to leave the destination container in order to drag and drop away the only one element that should be present. The second one is the solution I already adopted but sometimes it acts strangely. I haven't figured it out yet but once in a while when I drop an element the drop event fires, the attribute is set but the element dropped doesn't end up in the container (and in the dom). |
Ok you could change the class of the container, so that initially it has an |
Use Slack for support requests. See #248. |
Hi,
I'm trying to set up a droppable container which only allows one element to be dropped. After the container has an element dropped, any subsequent drop would cause the current dropped item to be programmatically dragged and dropped back to the originating container.
I can obviously manipulate the DOM but I would prefer a more intuitive experience to indicate the dropped area only allows one item.
This obviously isn't a feature of dragula but is it possible using the drop event?
Cheers
The text was updated successfully, but these errors were encountered: