Opened 10 years ago
Closed 10 years ago
#8698 closed feature (wontfix)
different values for snapTolerance by direction
Reported by: | detlevv | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.10.0 |
Component: | ui.draggable | Version: | 1.8.6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The snapTolerance could be different by x- or y-direction. This is useful, if the user wants to snap only in one direction oder with different tolerance values.
This could by done by accepting an optional array like this:
drag: function(event, ui) {
var inst = $(this).data("draggable"), o = inst.options; var dx = (typeof o.snapTolerance !== "number" ? o.snapTolerance[0] : o.snapTolerance),
dy = (typeof o.snapTolerance !== "number" ? o.snapTolerance[1] : o.snapTolerance);
After that the code should use dx or dy as appropriate.
HTH, detlevv
Note: See
TracTickets for help on using
tickets.
We'll be removing snapping from the core of draggable during the rewrite, so we won't be modifying the API at this time.