#682 closed defect (fixed)
DnD dosnt work properly when constrained to a node (patch attached - CLA is on file - file dnd/HtmlDragAndDrop.js).
Reported by: | Owned by: | bill | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Core | Version: | 0.2 |
Keywords: | Cc: | [email protected]… | |
Blocked By: | Blocking: |
Description (last modified by )
getConstraints assumed the constraining node was positioned at 0,0 ... When its not then the constraining box is not positioned correctly .. Here's a patch.
146d145 < screenPos = dojo.style.getAbsolutePosition(this.constrainingContainer, true); 150,153c149,152 < minX: padLeft + screenPos.x, < minY: padTop + screenPos.y, < maxX: padLeft+width - dojo.style.getOuterWidth(this.domNode) + screenPos.x, < maxY: padTop+height - dojo.style.getOuterHeight(this.domNode) + screenPos.y --- > minX: padLeft, > minY: padTop, > maxX: padLeft+width - dojo.style.getOuterWidth(this.domNode), > maxY: padTop+height - dojo.style.getOuterHeight(this.domNode)
Attachments (3)
Change History (11)
comment:1 Changed 16 years ago by
Cc: | [email protected]… added |
---|
Changed 16 years ago by
Changed 16 years ago by
comment:2 Changed 16 years ago by
Err .. ignore that second patch bill .. sorry bout that :-)
padRight is calculated by padLeft + contentWidth .... so its taken care of .. Attached is a diff (against the original - not my first diff ..) & a test case for the nightly build ..
Cheers Richard
comment:3 Changed 16 years ago by
Richard - left and right padding are not necessarily the same. You need to look at the value of padding-right, not just padding-left. (Similary for padding-bottom)
comment:4 Changed 16 years ago by
Component: | General → Core |
---|---|
Milestone: | → 0.3.1 |
Priority: | high → normal |
comment:5 Changed 16 years ago by
Description: | modified (diff) |
---|
comment:6 Changed 16 years ago by
Owner: | changed from anonymous to bill |
---|
Note: See
TracTickets for help on using
tickets.
Thanks for the patch. Please attach patches rather then putting them inline. Otherwise the formatting gets messed up.
Also, shouldn't the calculation for maxX/maxY reference padRight, padBottom?