code: function( event ) {
  
              if ( typeof ( event.pageX ) == "number" ) {
                  $.getMousePosition = function( event ){
                      var result = new $.Point();
  
                      event = $.getEvent( event );
                      result.x = event.pageX;
                      result.y = event.pageY;
  
                      return result;
                  };
              } else if ( typeof ( event.clientX ) == "number" ) {
                  $.getMousePosition = function( event ){
                      var result = new $.Point();
  
                      event = $.getEvent( event );
                      result.x =
                          event.clientX +
                          document.body.scrollLeft +
                          document.documentElement.scrollLeft;
                      result.y =
                          event.clientY +
                          document.body.scrollTop +
                          document.documentElement.scrollTop;
  
                      return result;
                  };
              } else {
                  throw new Error(
                      "Unknown event mouse position, no known technique."
                  );
              }
  
              return $.getMousePosition( event );
          }
docs: Gets the position of the mouse on the screen for a given event.
  @function
  @param {Event} [event]
  @returns {OpenSeadragon.Point}