Hi Selva,
news <[EMAIL PROTECTED]> wrote on 04/11/2006 09:00:50 AM:
> I have created <g> element with 2 rectangles. I tried to move the group
> element using translate. but it is not moving properly. Each time it is
going
> to initial position, which had before moving the element. I have
attached my
> sample code for your reference.
That is because your localPt function includes the transform you just
set. You need to pass ee's parent because that is really the coordinate
system
you are moving in (by adjusting the transform on the group).
> if (action == DRAG) {
> Element ee = (Element)((Element)actionNode).getParentNode();
> SVGPoint pt = localPt(ee, elEvt.getClientX(), elEvt.getClientY());
Change this line to:
SVGPoint pt = localPt((Element)(ee.getParenNode()),
elEvt.getClientX(), elEvt.getClientY());
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]