keydragzoom/src/keydragzoom.js
function (e) {
    var posX = 0, posY = 0;
    e = e || window.event;
    if (typeof e.pageX !== "undefined") {
      posX = e.pageX;
      posY = e.pageY;
    } else if (typeof e.clientX !== "undefined") { // MSIE
      posX = e.clientX + scroll.x;
      posY = e.clientY + scroll.y;
    }
    return {
      left: posX,
      top: posY
    };
  }
function (e) {
    var posX = 0, posY = 0;
    e = e || window.event;
    if (typeof e.pageX !== "undefined") {
      posX = e.pageX;
      posY = e.pageY;
    } else if (typeof e.clientX !== "undefined") { // MSIE
      posX = e.clientX + scroll.x;
      posY = e.clientY + scroll.y;
    }
    return {
      left: posX,
      top: posY
    };
  }
function ( e ) { var posX = 0 , posY = 0 ; e = e || window . event ; if ( typeof e . pageX !== "undefined" ) { posX = e . pageX ; posY = e . pageY ; } else if ( typeof e . clientX !== "undefined" ) { // MSIE
 posX = e . clientX + scroll . x ; posY = e . clientY + scroll . y ; } return { left : posX , top : posY } ; }
Get the position of the mouse relative to the document.
@param {Event} e  The mouse event.
@return {Object} The position object {left, top}.
Get the position of the mouse relative to the document .