ExtDraggableObject/src/ExtDraggableObject.js
function mouseDown_(ev) {
    var e=ev||event;
    setCursor_(true);
    event_.trigger(me, "mousedown", e);
    if (src.style.position !== "absolute") {
      src.style.position = "absolute";
      return;
    }
    formerMouseX_ = e.pageX||(e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft);
    formerMouseY_ = e.pageY||(e.clientY+document.body.scrollTop+document.documentElement.scrollTop);
    originalX_ = src.offsetLeft;
    originalY_ = src.offsetTop;
    formerX_ = originalX_;
    formerY_ = originalY_;
    mouseMoveEvent_ = event_.addDomListener(target_, "mousemove", mouseMove_);
    if (src.setCapture) {
      src.setCapture();
    }
    if (e.preventDefault) {
      e.preventDefault();
      e.stopPropagation();
    } else {
      e.cancelBubble=true;
      e.returnValue=false;
    }
    moving_ = true;
    event_.trigger(me, "dragstart", {mouseX: formerMouseX_, mouseY: formerMouseY_, startLeft: originalX_, startTop: originalY_, event:e});
  }
function mouseDown_(ev) {
    var e=ev||event;
    setCursor_(true);
    event_.trigger(me, "mousedown", e);
    if (src.style.position !== "absolute") {
      src.style.position = "absolute";
      return;
    }
    formerMouseX_ = e.pageX||(e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft);
    formerMouseY_ = e.pageY||(e.clientY+document.body.scrollTop+document.documentElement.scrollTop);
    originalX_ = src.offsetLeft;
    originalY_ = src.offsetTop;
    formerX_ = originalX_;
    formerY_ = originalY_;
    mouseMoveEvent_ = event_.addDomListener(target_, "mousemove", mouseMove_);
    if (src.setCapture) {
      src.setCapture();
    }
    if (e.preventDefault) {
      e.preventDefault();
      e.stopPropagation();
    } else {
      e.cancelBubble=true;
      e.returnValue=false;
    }
    moving_ = true;
    event_.trigger(me, "dragstart", {mouseX: formerMouseX_, mouseY: formerMouseY_, startLeft: originalX_, startTop: originalY_, event:e});
  }
function mouseDown_ ( ev ) { var e = ev || event ; setCursor_ ( true ) ; event_ . trigger ( me , "mousedown" , e ) ; if ( src . style . position !== "absolute" ) { src . style . position = "absolute" ; return ; } formerMouseX_ = e . pageX || ( e . clientX + document . body . scrollLeft + document . documentElement . scrollLeft ) ; formerMouseY_ = e . pageY || ( e . clientY + document . body . scrollTop + document . documentElement . scrollTop ) ; originalX_ = src . offsetLeft ; originalY_ = src . offsetTop ; formerX_ = originalX_ ; formerY_ = originalY_ ; mouseMoveEvent_ = event_ . addDomListener ( target_ , "mousemove" , mouseMove_ ) ; if ( src . setCapture ) { src . setCapture ( ) ; } if ( e . preventDefault ) { e . preventDefault ( ) ; e . stopPropagation ( ) ; } else { e . cancelBubble = true ; e . returnValue = false ; } moving_ = true ; event_ . trigger ( me , "dragstart" , { mouseX : formerMouseX_ , mouseY : formerMouseY_ , startLeft : originalX_ , startTop : originalY_ , event : e } ) ; }
Handles the mousedown event.
@param {event} ev The event data sent by the browser.
@private
Handles the mousedown event .