#7251 closed bug (fixed)
Draggable: constrained axis option returns incorrect position
Reported by: | joshco | Owned by: | mikesherov |
---|---|---|---|
Priority: | minor | Milestone: | 1.11.0 |
Component: | ui.draggable | Version: | 1.8.11 |
Keywords: | Cc: | Scott González | |
Blocked by: | Blocking: |
Description
when using draggabls with axis : 'y', it will constrain the movement of the entity visually. however, if the mouse is moved along the 'x' axis, the ui.position.left will return the delta of the mouse move. The expected result is 0, ie no movement.
repros with Jquery 1.5.2
Change History (10)
comment:2 Changed 11 years ago by
Milestone: | 1.9.0 → 2.0.0 |
---|
comment:3 Changed 11 years ago by
Status: | new → open |
---|
confirmed on latest: http://jsfiddle.net/3ythc/
comment:4 Changed 11 years ago by
Cc: | scott.gonzalez added |
---|
Scott, even though I marked this as open, this might simply be a documentation issue. Should ui.position be constrained if there is a containment, or should it always track the mouse, and not the element?
comment:5 Changed 11 years ago by
Summary: | draggable with constrain axis option returns incorrect position → Draggable: constrained axis option returns incorrect position |
---|
comment:6 Changed 11 years ago by
ui.position
should be the constrained value. Users are allowed to modify the value in order to implement custom constraints, which would affect the value in later event handlers; so there's no reason that built-in contraints shouldn't modify the value directly. However, there is a question of whether built-in constraints should run before or after user-bound event handlers.
comment:8 Changed 10 years ago by
Owner: | set to mikesherov |
---|---|
Status: | open → assigned |
comment:9 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Draggable: apply axis options to position instead of style. Fixes #7251 - Draggable: constrained axis option returns incorrect position.
Changeset: 94f8c4d5e9ef461973a504d65dd906c1120da71d
comment:10 Changed 10 years ago by
Milestone: | 2.0.0 → 1.11.0 |
---|
I have the exact same problem. Created this jsfiddle to illustrate http://jsfiddle.net/Znarkus/m27CK/