Draggable :: Переноситель
Snap to element or grid :: Переноситель Меченный
К сожалению, по данной теме я не понял ничего. Я даже не понял, чем отличается:
$( "#draggable" ).draggable({ snap: true });
от
$( "#draggable" ).draggable({ snap: false });
не говоря уже о более сложных вещах. Предлагаю разобраться самостоятельно, и если что-то станет ясным, сообщите мне, буду очень благодарен.
Snap the draggable to the inner or outer boundaries of a DOM element. Use the snap
, snapMode
(inner, outer, both), and snapTolerance
(distance in pixels the draggable must be from the element when snapping is invoked) options.
Or snap the draggable to a grid. Set the dimensions of grid cells (height and width in pixels) with the grid
option.