No, this does not work. :-) The e.x and e.y vars contain coordinates of the
mouse relative to the complete page. To get these values relative to the
layer, you have to subtract the layer's x/y-position relative to the
complete page.

I have tried

  this.x=is.ie?e.x-this.src.pageX:e.layerX;
  this.y=is.ie?e.y-this.src.pageY:e.layerY;

but the result was a NaN.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Michael
> Pemberton
> Sent: Sunday, March 11, 2001 11:33 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [Dynapi-Dev] Last attempt: Fixed bug in events.js for IE
> 5.5 (I will not post this again) ;-)
>
>
> is it possible to use e.pageX / e.pageY as set on the previous
> lines instead of calling getPageX for the layer?
>
> Robert Rainwater wrote:
>
> > It's now in CVS.
> >
> > --
> > Robert Rainwater
> >
> > On 3/10/2001, 1:09:40 PM EST, Christof wrote about
> "[Dynapi-Dev] Last attempt: Fixed bug in events.js for IE 5.5 (I
> will not post this again) ;-)":
> >
> > > Hi everybody!
> >
> > > This goes out to the project admins and all developers of
> DynAPI 2. It's the
> > > last reminder I will send to this list regarding the
> following bug. :-)
> >
> > > As I have mentioned twice before: there is a bug for IE 5.5
> (at least, most
> > > likely IE 5.0 and 4.x will be broken also)in
> src/lib/dynapi/api/events.js.
> >
> > > IE 5.5 will return wrong coordinates when using e.getX()/e.getY() in
> > > EventListeners if the DynLayer's content is a table and/or images.
> >
> > > I have set up two pages as an example of the bug and a fixed
> version of
> > > events.js. Surf to http://www.evolion.de/dynapi2_bug/ with
> both Netscape 4
> > > and IE 5.5 and follow the instructions there. I have included
> comments in
> > > the source code of the pages so you can easily find the
> important parts of
> > > it.
> >
> > > To fix the bug, change lines 34 and 35 of events.js (current
> CVS version)
> > > to:
> >
> > >   this.x=is.ie?e.x-this.src.getPageX():e.layerX;
> > >   this.y=is.ie?e.y-this.src.getPageY():e.layerY;> >
> > > Maybe there are better ways to fix it, but this one works! :-)
> >
> > > If there should be further questions, please mail me!
> >
> > > Christof
> >
> > > _______________________________________________
> > > Dynapi-Dev mailing list
> > > [EMAIL PROTECTED]
> > > http://lists.sourceforge.net/lists/listinfo/dynapi-dev
> >
> > _______________________________________________
> > Dynapi-Dev mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/dynapi-dev
>
> --
> Michael Pemberton
> [EMAIL PROTECTED]
> ICQ: 12107010
>
>
>
>
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-dev
>


_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev

Reply via email to