Thank you, David, that is a much better approach.

David Dailey wrote:

>At 11:58 AM 3/31/2006, Darryl Watson wrote:
>  
>
>>Hello all-
>>
>>I have a need to implement a 'rubber-band' function on an SVG drawing.
>>This is where you click on the drawing, then as you move the mouse
>>around, a line is drawn between your mouse click point and the mouse.
>>
>>I've managed to confuse myself about how to code this kind of function.
>>I essentially want to repeatedly delete and create a line segment in a
>>top layer (group definition) every time the mouse moves, correct?  Or is
>>there an easier way to do this?
>>
>>Thanks!
>>    
>>
>
>What I typically do is something like:
>
>x=evt.clientX;
>y=evt.clientY;
>L1.setAttribute("x1",x);
>L1.setAttribute("y1",y)
>
>L1 is a line
>where this is done onmousemove.
>
>this moves just one endpoint of the line as the mouse moves. What can 
>get tricky is the assignment and subsequent withdrawal of 
>event-handlers to things.
>
>Take a look at the polyline tool in 
>http://srufaculty.sru.edu/david.dailey/svg/polylineBest.html (IE only 
>at the moment) for an application.
>  
>



-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to