X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2Fgrid%2FGridDragZone.js;h=70932cc8b368d3919c40625b27267d7d20c982c3;hb=86b8de9b171833430cbdebcd05af0a1240f5832f;hp=1a596615c6259ab0023ecdc06728a5bff535528b;hpb=be54f48945f23f427b0272a1959b7d73178eba11;p=roojs1 diff --git a/Roo/grid/GridDragZone.js b/Roo/grid/GridDragZone.js index 1a596615c6..70932cc8b3 100644 --- a/Roo/grid/GridDragZone.js +++ b/Roo/grid/GridDragZone.js @@ -44,7 +44,12 @@ Roo.extend(Roo.grid.GridDragZone, Roo.dd.DragZone, { } } + if (sm.getSelections && sm.getSelections().length < 1) { + return false; + } + + // before it used to all dragging of unseleted... - now we dont do that. if(rowIndex !== false){ // if editorgrid.. @@ -65,14 +70,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; }, - + + onInitDrag : function(e){ var data = this.dragData; this.ddel.innerHTML = this.grid.getDragDropText();