Opened 15 years ago
Closed 14 years ago
#323 closed enhancement (wontfix)
[patch][need cla] drag and drop support for SVG widgets
Reported by: | dylan | Owned by: | Tom Trenka |
---|---|---|---|
Priority: | low | Milestone: | 0.9 |
Component: | General | Version: | |
Keywords: | svg, dnd | Cc: | [email protected]… |
Blocked By: | Blocking: |
Description
add support for drag and drop API for SVG widgets.
Change History (8)
comment:1 Changed 15 years ago by
Status: | new → assigned |
---|
comment:2 Changed 15 years ago by
Cc: | [email protected]… added |
---|
comment:3 Changed 15 years ago by
The previous code does not support arbitrary shaped SVGElements, e.g. the path element.
The new extractBox:
function extractBox( elem ) { var box = elem.getBBox(); box.p1 = new Point(box.x, box.y); box.p2 = new Point( box.p1.x + box.width, box.p1.y + box.height); return box; }
and thenew tail of getTotalOffset:
else if(node[coord] && ! node.constructor.toString().indexOf("SVG") ){ offset += node[coord]; }else if( node.constructor.toString().indexOf("SVG") ){ if( ! node.screenCoords ) calculateScreenCoords( node ); offset += node.screenCoords[coord]; } return offset;
comment:4 Changed 15 years ago by
Milestone: | 0.3release → 0.4 |
---|---|
Owner: | changed from dylan to Tom Trenka |
Status: | assigned → new |
Reassigning.
comment:5 Changed 15 years ago by
Version: | 0.3 |
---|
comment:6 Changed 14 years ago by
Summary: | drag and drop support for SVG widgets → [patch][need cla] drag and drop support for SVG widgets |
---|
Ben, sorry for the delay in looking at your patch. We need a CLA on file for you I think, http://dojotoolkit.org/icla.txt
comment:7 Changed 14 years ago by
Milestone: | 0.4 → 0.5 |
---|
comment:8 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Closing this in favor of dojox.gfx and the new DnD system, which should be working with it.
Note: See
TracTickets for help on using
tickets.
I have started a fix for this, if anyone is interested. I'm transforming the elements local coordinates to the screen coordinates via getScreenCTM, but I am having trouble with scroll position. Maybe someone can help with that part?
I added these functions to style.js:
and this is the new tail end of dojo.style.getTotalOffset:
getInner* and getContent* also have changed"
Finally (I think) I made a change to isInsideBox to try and help with the scrolling issue (far from perfect):