Hi Javid,
Unfortunately the circles are not SVG elements, I added them on the canvas
after the svg document was rendered ... any thoughts :(
Tx
yasmin
> Yasmin,
> Is the red circle a SVG element, in which case you can add event listeners
> to the element and change it's attributes.
>
> Sample Snippet code:
>
> Element element = doc.getElementBydId("red_cicle");
> element.addEventListener("click", new CircleAction(), false);
>
> public class CircleAction implements EventListener
> {
> public void handleEvent(Event evt)
> {
> Element elt = (Element) evt.getCurrentTarget();
> if (evt.getType() == "click")
> {
> elt.setAttributeNS(SVG_NS, "fill", "<color code");
> }
> }
> }
>
> Hope it helps,
> You wouldn't have to implement MouseListener or MouseMotionListener and
> implements those mouse events.
>
>
> Thanks,
> Javid
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Saturday, March 11, 2006 3:18 PM
> To: [email protected]
> Subject: ZoomIn Problem
>
>
> Hi there,
>
> I'm having problems with zoomIn to my JSVGCanvas, What I'm trying to
> achieve is when a user clicks on red circls on the map the circls changes
> colour to yellow, well that is fine before I zoomIn - afterwards when I
> click on the red circle it does not change colour, I think I know where
> the problem is, I've coded my mouseClick event, so that when the user
> clicks the code checks the distance between the click and the circles, the
> Point2D of the circles are stored in an array But when I zoomIn the
> location of the circles have changed but how to I update the new locations
> in my array????
>
> Many Tx inadvance,
>
> Yasmin
>
>
> ---------------------------------------------------------------------
> 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]