Changeset 7769

Show
Ignore:
Timestamp:
03/22/07 22:39:46 (20 months ago)
Author:
elazutkin
Message:

dnd2: testing and fixing border cases --- source but no target, and target but no source

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/dnd2/source.js

    r7767 r7769  
    8080                        } 
    8181                }else{ 
    82                         if(this.mouse_down){ 
     82                        if(this.mouse_down && this.is_source){ 
    8383                                m.startDrag(this, this.getSelectedNodes(), e.ctrlKey); 
    8484                        } 
     
    109109                        this.changeState("Source", this == source ? (copy ? "Copied" : "Moved") : ""); 
    110110                } 
    111                 if(this.accept){ 
    112                         var accepted = this.checkAcceptance(source, nodes); 
    113                         this.changeState("Target", accepted ? "" : "Disabled"); 
    114                         if(accepted){ 
    115                                 dojo.dnd2.manager().overSource(this); 
    116                         } 
     111                var accepted = this.accept && this.checkAcceptance(source, nodes); 
     112                this.changeState("Target", accepted ? "" : "Disabled"); 
     113                if(accepted){ 
     114                        dojo.dnd2.manager().overSource(this); 
    117115                } 
    118116                this.is_dragging = true;