Opened 14 years ago
Closed 14 years ago
#1683 closed enhancement (wontfix)
Expose dragObject's absolute position
Reported by: | Owned by: | Eugene Lazutkin | |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | DnD | Version: | 0.3 |
Keywords: | dnd dragObject absolute position | Cc: | |
Blocked By: | Blocking: |
Description
It is useful to know the distance an object has been dragged (for example, using dragging to pan around an image). It would be nice to have a method to obtain these coordinates from the dragObject.
The following snippet works fine, but since dragClone is not in the dnd API, it might eventually break:
var drag = new dojo.dnd.HtmlDragSource(someDiv, "someDiv"); var target = new dojo.dnd.HtmlDropTarget(otherDiv, ["someDiv"]) dojo.event.connect(drag, "onDragEnd", "showXY"); function showXY (dragEvt) { alert([dojo.html.getAbsoluteX(dragEvt.dragObject.dragClone), dojo.html.getAbsoluteY(dragEvt.dragObject.dragClone)]); }
Change History (3)
comment:1 Changed 14 years ago by
Milestone: | → 0.5 |
---|---|
Owner: | changed from psowden to alex |
Status: | new → assigned |
comment:2 Changed 14 years ago by
Owner: | changed from alex to Eugene Lazutkin |
---|---|
Status: | assigned → new |
comment:3 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
This functionality can be implemented in the user's code in 0.9.