Opened 10 years ago
Last modified 10 years ago
#8578 open bug
draggable: position rounding errors with non-integer grid
Reported by: | martinus | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 2.0.0 |
Component: | ui.draggable | Version: | git (not yet released) |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When I define grid for draggable with float (non-integer) values, it works only for the first drag. When dragging around multiple times, the grid fails due to rounding errors.
See http://jsfiddle.net/hYH9v/2/ and try to drag the box around multiple times. You could end at positions 2.2, 328.7 and similar.
I think the draggable should remember its starting position and round its later position with respect to the defined grid.
This is similar to bug #4124 for ui.slider, it was solved with _trimAlignValue function. If we allow non-integer steps for slider, we should allow them for draggable too.
Change History (3)
comment:1 Changed 10 years ago by
Milestone: | 1.9.0 → 2.0.0 |
---|
comment:2 Changed 10 years ago by
Status: | new → open |
---|
comment:3 Changed 10 years ago by
Summary: | draggable position rounding errors with non-integer grid → draggable: position rounding errors with non-integer grid |
---|
Note: See
TracTickets for help on using
tickets.
confirmed on latest: http://jsfiddle.net/4ZQws/