Sounds exactly like the problem.  I just did 
document.createElement("polyline").  As you can see the resultant XML doesn't 
look any different but I guess something in the way the document is stored in 
memory is different.  I couldn't find a Shape->SVG equivalent for a polyline, 
so I figured I had to do it myself.  I'll try the createElementNS and hopefully 
that will resolve it.
 
This application is coming along nicely thanks to all your help!
 
Michael Bishop

________________________________

From: Thomas DeWeese [mailto:[EMAIL PROTECTED]
Sent: Thu 9/22/2005 6:02 AM
To: [email protected]
Subject: Re: Possible bug with JSVGCanvas and certain Elements?



Hi Michael,

Bishop, Michael W. CONTR J9C880 wrote:

> I'm implementing a "free-form" line where the user can draw by pressing
> and holding the mouse.  This is for a whiteboard application.  I sample
> the mouse locations, get a collection of Points, and then create a
> "polyline" element from the results and append it to the document (in
> the RunnableQueue) which should update my JSVGCanvas (set to
> ALWAYS_DYNAMIC).  This will not update the screen!  I can draw other
> shapes using the SVGShape class (Ellipse, Rectangle, Line) and they all
> work fine.

    So you create the 'polyline' element and the SVGShape class creates
the others?  Then the most likely problem is that you are not setting
the SVGNamespace when you create your polyline element.  So you have
a poly line element it's just not an SVG polyline element.  you
want to use something like:

element = document.createElementNS(SVGConstants.SVG_NAMESPACE_URI,
                                    SVGConstants.SVG_POLYGON_TAG);

> Even drawing after the polyline does not cause the polyline
> to be rendered.  However, if I save the SVGDocument to a file, then load
> it, the polyline shows up??

    Yes, this is common, when you read the document back it 'fixes' the
namespace problem.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


<<winmail.dat>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to