Loading ...
Sorry, an error occurred while loading the content.

Re: Can setOuterHandleElId work?

Expand Messages
  • amf_alvorada
    ... I did this - YAHOO.util.DragDrop.prototype = { outerHandle: false, //created this var Then - setOuterHandleElId: function(id) {
    Message 1 of 2 , Jun 6, 2006
    • 0 Attachment
      --- In ydn-javascript@yahoogroups.com, "tol1818" <tol1818@...> wrote:
      >
      > In yui dragdrop, when I set a DD object setOuterHandleElId to a another
      > div, it cann't work.
      > Cause in handleMouseDown method,
      > this.DDM.isOverTarget(pt, this)
      > will check whether the point is in the DD object. Since the outer
      > Handle div is not in the DD. so, the event cann't be fired.
      >
      > Anything wrong?
      >

      I did this -

      YAHOO.util.DragDrop.prototype = {
      outerHandle: false, //created this var

      Then -

      setOuterHandleElId: function(id) {
      YAHOO.util.Event.addListener(id, "mousedown",
      this.handleMouseDown, this, true);
      this.setHandleElId(id);
      outerHandle = true; //set to true here

      Then -

      this.isOverTarget = function(pt, oDDTarget, intersect) {
      if(outerHandle) { return true; } //bypass the validtarget check

      It seems to work here.

      --
      Alexandre (amf)
    Your message has been successfully submitted and would be delivered to recipients shortly.