roojs-core.js
[roojs1] / roojs-debug.js
index 3cac4b8..257bcc4 100644 (file)
@@ -58026,12 +58026,13 @@ Roo.extend(Roo.grid.GridDragZone, Roo.dd.DragZone, {
             }
         
         }
+        if (sm.getSelections && sm.getSelections().length < 1) {
+            return false;
+        }
         
-        var sels = sm.getSelections ? sm.getSelections() : (
-                    sm.getSelectedCell() ? [ this.grid.ds.getAt(sm.getSelectedCell()[0]) ] : []);
         
         // before it used to all dragging of unseleted... - now we dont do that.
-        if(sels){
+        if(rowIndex !== false){
             
             // if editorgrid.. 
             
@@ -58051,19 +58052,14 @@ Roo.extend(Roo.grid.GridDragZone, Roo.dd.DragZone, {
                 grid: this.grid,
                 ddel: this.ddel,
                 rowIndex: rowIndex,
-                selections:sm.getSelections ? sm.getSelections() : (
-                    sm.getSelectedCell() ? [ this.grid.ds.getAt(sm.getSelectedCell()[0]) ] : []
-                )
+                selections: sm.getSelections ? sm.getSelections() : (
+                    sm.getSelectedCell() ? [ this.grid.ds.getAt(sm.getSelectedCell()[0]) ] : [])
             };
         }
         return false;
     },
     
-    onBeforeDrag : function(data, e)
-    {
-        // if we dont have any data to drag - then cancel.
-        return data !== false;
-    },
+    
     onInitDrag : function(e){
         var data = this.dragData;
         this.ddel.innerHTML = this.grid.getDragDropText();