JQuery UI: sortable and drag-and-drop behavior when deleting an object

When working with jQuery sortable, draggable and accessible.

  • Removing a sortable item in a sortable one.
  • Drop the draggable in droppable.

The container into which we throw an object accepts it only if the central position of this object lies in the containers of the container.

Sorry, the above statement is too complicated, see the figure below.

How can we change the acceptance point?

enter image description here

+4
source share
1 answer

You can use the tolerance option ( droppable , sortable ).

  • droppable() supports fit , intersect , pointer and touch .

  • sortable() only supports intersect and pointer .

default intersect for both widgets.

+4
source

All Articles