draggable: position rounding errors with non-integer grid
|Reported by:||martinus||Owned by:|
|Component:||ui.draggable||Version:||git (not yet released)|
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.