Put a really big square behind all your other graphics. Then hook up
your events to that. The svg itself can't catch those events.


On Fri, 11 Mar 2005 18:27:14 -0000, pallavi_nagarhalli
<[EMAIL PROTECTED]> wrote:
> 
> 
> Hi,
> 
> Actually I want to capture the mousedown event on the root element ie
> svg element. But I am not able to capture it. I am printing out an
> alert in the mousedown. The alert shows up for all the other elements
> but the svg element. How can I capture the event?
> 
> Thanks,
> Pallavi
> --- In svg-developers@yahoogroups.com, "Peter Kalev" <[EMAIL PROTECTED]>
> wrote:
> > In this case you must capture the events on those element and stop
> > propagation of the event...
> >
> > Peter Kalev
> > Senior Developer,
> > SWF, LLC
> >
> >
> > -----Original Message-----
> > From: pallavi_nagarhalli [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 10, 2005 3:59 PM
> > To: svg-developers@yahoogroups.com
> > Subject: [svg-developers] Re: Overriding ctrl+mousedown
> >
> >
> >
> > Hi,
> >
> > I have a strange problem now.
> > I have added the mousedown, onload, onclick event handlers to the
> > rootNode ie the svg node.
> > But the mousedown function is firing only when the evt.getTarget()
> is
> > anything other than the svg element itself (like path for eg). So
> > whenever i ctrl+mousedown on a path element, the callMyZoomIn()
> from
> > the mousedown fires. otherwise, if i ctrl+mousedown on the svg
> > element, the mousedown event is not firing and the default zoomin
> > action is occuring.
> > how do i stop the default action.
> > Please help.
> >
> > Thanks,
> > pallavi.
> >
> > PS: I have made sure that the element to which i have added the
> event
> > handlers is the rootnode.
> > Also, i dont have an id for the root element.
> >
> > --- In svg-developers@yahoogroups.com, "Peter Kalev" <[EMAIL PROTECTED]>
> > wrote:
> > > Use this:
> > >
> > > <svg id="main" onload="init(evt);"
> > > onclick="evt.stopPropagation();evt.preventDefault();"
> onmousedown="
> > > evt.stopPropagation();evt.preventDefault();">
> > >
> > > ...to kill context menu...
> > >
> > > Peter Kalev
> > > Senior Developer,
> > > SWF, LLC
> > >
> > >
> > > -----Original Message-----
> > > From: pallavi_nagarhalli [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, March 09, 2005 4:15 PM
> > > To: svg-developers@yahoogroups.com
> > > Subject: [svg-developers] Overriding ctrl+mousedown
> > >
> > >
> > >
> > > Hi,
> > >
> > > I am trying to provide my own zoomin function when
> > evt.ctrlKey==true.
> > > I call the function as
> > >
> > > if(evt.ctrlKey==true)
> > > {
> > >       callMyZoomIn()
> > > }
> > >
> > > The function callMyZoomIn() is called. But when it finishes
> > > executing, the normal ctrl+mousedown is also happening. ie zoom
> in.
> > >
> > > How do i stop that default action. Please help.
> > >
> > > Thanks,
> > > Pallavi
> > >
> > >
> > >
> > >
> > >
> > > -----
> > > 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 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 unsubscribe send a message to: [EMAIL PROTECTED]
> -or-
> visit http://groups.yahoo.com/group/svg-developers and click "edit my 
> membership"
> ----
> Yahoo! Groups Links
> 
> 
> 
> 
> 


-- 
Joel Lucsy
"The dinosaurs became extinct because they didn't have a space
program." -- Larry Niven


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

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