Patches item #413952, was updated on 2001-04-05 03:49 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=305757&aid=413952&group_id=5757 Category: DynAPI 2 Event Group: None Status: Open Priority: 5 Submitted By: Christof Pohl (chripo) Assigned to: Nobody/Anonymous (nobody) Summary: mouse coords in events Initial Comment: Hi everybody! :-) Under certain circumstances, mouse events return wrong coords when calling "event.getX/Y()" or "event.getPageX/Y()" In "mouse.js" from the 05-04-2001 CVS version of DynAPI, I have replaced the following lines 67-70: evt.pageX=is.ie?e.x+document.body.scrollLeft:e.pageX-window.pageXOffset; evt.pageY=is.ie?e.y+document.body.scrollTop:e.pageY-window.pageYOffset; evt.x=is.ie?e.x-evt.src.getPageX():e.layerX evt.y=is.ie?e.y-evt.src.getPageY():e.layerY with this: if (is.ns4 && type=='mouseover') { // debugging for NS4 mouseover event evt.pageX=evt.pageX; evt.pageY=evt.pageY; evt.x=evt.pageX-evt.src.getPageX() evt.y=evt.pageY-evt.src.getPageY() } else { // standard DynAPI coordinate calculation evt.pageX=is.ie?e.x+document.body.scrollLeft:e.pageX; evt.pageY=is.ie?e.y+document.body.scrollTop:e.pageY; evt.x=is.ie?evt.pageX-evt.src.getPageX():e.layerX evt.y=is.ie?evt.pageY-evt.src.getPageY():e.layerY } This fixed the bug for me (NS 4.73 and IE 5.5 on Windows 2000 tested, more tests coming soon). Please visit http://www.evolion.de/dynapi2_dev/events.htm for more information on this matter as well as a small test environment for this bug. Best regards, Christof ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=305757&aid=413952&group_id=5757 _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/dynapi-dev
