Skip to main content

Search and Top Navigation

#8698 closed feature (wontfix)

Opened October 18, 2012 02:24PM UTC

Closed October 18, 2012 02:44PM UTC

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

Attachments (0)
Change History (1)

Changed October 18, 2012 02:44PM UTC by scottgonzalez comment:1

resolution: → wontfix
status: newclosed

We'll be removing snapping from the core of draggable during the rewrite, so we won't be modifying the API at this time.