From: Richard B. <ric...@us...> - 2001-11-05 19:23:13
|
Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/event In directory usw-pr-cvs1:/tmp/cvs-serv6788 Modified Files: mouse.js Log Message: added patch 413952 so NS4+6 return correct coords for getPageX when the page is scrolled. Index: mouse.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/event/mouse.js,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** mouse.js 2001/08/14 20:46:03 1.21 --- mouse.js 2001/11/05 19:23:10 1.22 *************** *** 36,40 **** setTimeout(realsrc+'.ns4clktimer=false',300); }; ! // This is THE event. DynMouseEvent._e=new DynMouseEvent() // If this is true, then mouseups always happen where the mousedown happened --- 36,40 ---- setTimeout(realsrc+'.ns4clktimer=false',300); }; ! // This is THE event. DynMouseEvent._e=new DynMouseEvent() // If this is true, then mouseups always happen where the mousedown happened *************** *** 73,80 **** // Step two: mouse coordinate properties ! 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 // Step three: mouse buttons --- 73,90 ---- // Step two: mouse coordinate properties ! 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 ! } ! // Step three: mouse buttons *************** *** 117,124 **** // This forces mouseUps to happen in the same place where mousedowns took place ! if (DynMouseEvent.forceMouseUp && is.def) { ! if (e.type=='mousedown') DynMouseEvent.focus=realsrc; ! else if (e.type=='mouseup' && DynMouseEvent.focus!=null) ! evt.src=realsrc=DynMouseEvent.focus; }; --- 127,134 ---- // This forces mouseUps to happen in the same place where mousedowns took place ! if (DynMouseEvent.forceMouseUp && is.def) { ! if (e.type=='mousedown') DynMouseEvent.focus=realsrc; ! else if (e.type=='mouseup' && DynMouseEvent.focus!=null) ! evt.src=realsrc=DynMouseEvent.focus; }; *************** *** 127,131 **** // Other checks. NS4 mainly ! if (is.ns4) { // See cancelBrowserEvent() if (realsrc.ns4clktimer && type=="mouseup") { --- 137,141 ---- // Other checks. NS4 mainly ! if (is.ns4) { // See cancelBrowserEvent() if (realsrc.ns4clktimer && type=="mouseup") { |