Trying to draw a dynamic rectangle in SVG
- by Shaun
To be more specific, here are the steps I need:
onmousedown - set x and y of rect as mouse coordinates
onmousemove - using the current x and y mouse coordinates calculate height and width of the rect, set these and append
onmouseup - remove the rectangle, and call a function based off some calculations from the rect.
Here is what I have but…