Hi Yasmin,
[EMAIL PROTECTED] wrote on 02/28/2006 03:56:35 PM:
> ThankU, I'm glad you mentioned the removing the group, because once I
get
> the circls drawn on to the canvas, when for example the user zooms_In to
a
> particular area, I dnt want to zoomIn into the red circls so I was
> thinking when you zoomIn to remove the 'circleGroup' and add them in
> again...what do you think????
What is going to be different when you zoom in? Just the size of the
circles?
If so I would use something like:
<g id="circleGroup" stroke-width="4" fill="none" stroke="red">
<circle cx="10" cy="10" r="0.00001"/>
</g>
Then you can just adjust the stroke-width on the 'g' to adjust the
"size" of the circles (this is just a few additional calls to
'setAttributeNS'
when you create the 'g').
> Many thx
>
> yasmin
>
>
>
>
> > Hi Yasmin,
> >
> > [EMAIL PROTECTED] wrote on 02/28/2006 03:37:12 PM:
> >
> >> ...yes you are right I haven't created a group with attribute 'id'
set
> > to
> >> 'circlegroup', not sure how to :( I'm a complete novice to SVG and
have
> >> embarked on this ambitiouse project I'm finding it very difficult and
> > time
> >> is running out, pls ELP!
> >
> > I would add something like:
> >
> > if (g == null) {
> > g = doc.createElementNS(SVGNS,"g");
> > g.setAttributeNS(null, "id", "circleGroup");
> > doc.getRootElement().appendChild(g);
> > }
> >
> > Right after you call getElementById.
> > In your case you could probably also just skip the
> > 'getElementById' and 'if' and just create the element in all cases
> > (but you should avoid creating it twice - it's bad to have two
> > elements with the same 'id' in one document).
> >
> > BTW If at some point you want to remove the group (and
> > consiquently all it's children) you can use:
> > g.getParentNode().removeChild(g);
> >
> > Good luck!
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail:
[EMAIL PROTECTED]
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]