Hi David,

I would like to change circles in your code to rect.  I did the 
following:

1. I change the backgroud from rect to polygon and it works.

2. I change the circle to rect by
        a. change "circle" to  "rect"
        b. change "r:rad" to
              "x:20",
              "y:30" in the Atribute assignment

However, this will be work for me.  What is wrong with my 
modification?

By the way, what is the meaning of "id":stroke in your code?  Why we 
need to do that?

Thank you for your help.

Tak 






--- In svg-developers@yahoogroups.com, "ddailey" <[EMAIL PROTECTED]> wrote:
>
> Hi Tak,
> 
> you wrote: "If the user creates 4 circles in your page, could we 
save all 4 circles (x,
> y, r, color) to a server and continue to work on his project the 
next day by
> redraw those circles from the saving data?  Do you happen to work 
that out
> yet?"
> 
> Sure we could and I think it would be fairly easy. In the source 
of http://srufaculty.sru.edu/david.dailey/svg/makeDragDrop.svg , 
> 
> there are a couple of lines after the DOM object (the circle = C) 
has been created, it is then populated with a collection of 
Attributes (Attr) and appended to the SVGDOM:
> 
>     assignAttr(C,Attr)
>     Root.appendChild(C)
> right in between there, I'd do something like this: 
BigArrayofCircles.push(Attr). Then whenever the user were to choose 
a "save" option (from say a menu) the BigArrayofCircles (which has 
already been serialized as an Object) could just be sent (via some 
format like plaintext, JSON, or AJAX -- JSON seems likely since 
that's close to what it is already) to a server (which would just 
scribble it into a file somehow). The clientside program would then 
just need a file open routine which would pretty much just be (after 
identifying the particular BigArrayofCircles, among those saved to 
the server, to be opened):
> 
> for (i in BigArrayofCircles) {var C=document.createElementNS
(xmlns,"circle") ;assignAttr(C,Attr)}
> 
> Holler if I have not made sense.
> David
> 
> 
> 
> 
> [Non-text portions of this message have been removed]
>



------------------------------------

-----
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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> 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