Changeset 7766
- Timestamp:
- 03/22/07 18:55:22 (22 months ago)
- Location:
- trunk/src/dnd2
- Files:
-
- 2 modified
-
manager.js (modified) (1 diff)
-
source.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/dnd2/manager.js
r7724 r7766 21 21 overSource: function(source){ 22 22 if(this.avatar){ 23 this.target = source; 23 this.target = (source && source.target_state != "Disabled") ? source : null; 24 this.avatar.update(); 24 25 } 25 26 dojo.event.topic.publish("dnd_source_over", source); -
trunk/src/dnd2/source.js
r7765 r7766 59 59 // mouse event processors 60 60 onMouseMove: function(e){ 61 if(this.is_dragging && this.target_state == "disabled"){ return; } 61 if(this.is_dragging && this.target_state == "Disabled"){ return; } 62 dojo.dnd2.Source.superclass.onMouseMove.call(this, e); 62 63 var m = dojo.dnd2.manager(); 63 if(this.container_state != "over"){64 m.overSource(this);65 }66 dojo.dnd2.Source.superclass.onMouseMove.call(this, e);67 64 if(this.is_dragging){ 68 65 // calculate before/after … … 106 103 }else if(this.is_dragging){ 107 104 var m = dojo.dnd2.manager(); 108 m.canDrop( !this.current || m.source != this || !(this.current.id in this.selection));105 m.canDrop(this.target_state != "Disabled" && (!this.current || m.source != this || !(this.current.id in this.selection))); 109 106 } 110 107 }, … … 155 152 this.changeState("Target", ""); 156 153 }, 157 // methods 154 // utilities 155 onOverEvent: function(){ 156 dojo.dnd2.Source.superclass.onOverEvent.call(this); 157 dojo.dnd2.manager().overSource(this); 158 }, 158 159 onOutEvent: function(){ 159 160 dojo.dnd2.Source.superclass.onOutEvent.call(this); 160 161 dojo.dnd2.manager().outSource(this); 161 162 }, 163 // methods 162 164 checkAcceptance: function(source, nodes){ 163 165 if(this == source){ return true; }