roojs-ui.js
authorAlan Knowles <alan@roojs.com>
Wed, 17 Mar 2021 08:27:02 +0000 (16:27 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 17 Mar 2021 08:27:02 +0000 (16:27 +0800)
roojs-ui-debug.js
roojs-all.js
roojs-debug.js

roojs-all.js
roojs-debug.js
roojs-ui-debug.js
roojs-ui.js

index 85d2eb9..a16c433 100644 (file)
@@ -2457,7 +2457,7 @@ var w=this.cm.getColumnWidth(this.cellIndex);var A=Math.max(w-this.grid.minColum
 // Roo/grid/GridDragZone.js
 Roo.grid.GridDragZone=function(A,B){this.view=A.getView();Roo.grid.GridDragZone.superclass.constructor.call(this,this.view.mainBody.dom,B);if(this.view.lockedBody){this.setHandleElId(Roo.id(this.view.mainBody.dom));this.setOuterHandleElId(Roo.id(this.view.lockedBody.dom));
 }this.scroll=false;this.grid=A;this.ddel=document.createElement('div');this.ddel.className='x-grid-dd-wrap';};Roo.extend(Roo.grid.GridDragZone,Roo.dd.DragZone,{ddGroup:"GridDD",getDragData:function(e){var t=Roo.lib.Event.getTarget(e);var A=this.view.findRowIndex(t);
-var sm=this.grid.selModel;if(sm.getSelectedCell){if(!sm.getSelectedCell()){return false;}if(A!=sm.getSelectedCell()[0]){return false;}}var B=sm.getSelections?sm.getSelections():(sm.getSelectedCell()?[this.grid.ds.getAt(sm.getSelectedCell()[0])]:[]);if(B){if(e.hasModifier()){sm.handleMouseDown(e,t);
+var sm=this.grid.selModel;if(sm.getSelectedCell){if(!sm.getSelectedCell()){return false;}if(A!=sm.getSelectedCell()[0]){return false;}}var B=sm.getSelections?sm.getSelections():(sm.getSelectedCell()?[this.grid.ds.getAt(sm.getSelectedCell()[0])]:[]);if(B||B.length){if(e.hasModifier()){sm.handleMouseDown(e,t);
 }Roo.log("getDragData");return {grid:this.grid,ddel:this.ddel,rowIndex:A,selections:sm.getSelections?sm.getSelections():(sm.getSelectedCell()?[this.grid.ds.getAt(sm.getSelectedCell()[0])]:[])};}return false;},onBeforeDrag:function(A,e){return A!==false;},onInitDrag:function(e){var A=this.dragData;
 this.ddel.innerHTML=this.grid.getDragDropText();this.proxy.update(this.ddel);},afterRepair:function(){this.dragging=false;},getRepairXY:function(e,A){return false;},onEndDrag:function(A,e){},onValidDrop:function(dd,e,id){this.hideProxy();},beforeInvalidDrop:function(e,id){}
 });
index 3cac4b8..f406f9b 100644 (file)
@@ -58031,7 +58031,7 @@ Roo.extend(Roo.grid.GridDragZone, Roo.dd.DragZone, {
                     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(sels || sels.length){
             
             // if editorgrid.. 
             
index a5a069e..882ca3c 100644 (file)
@@ -35026,7 +35026,7 @@ Roo.extend(Roo.grid.GridDragZone, Roo.dd.DragZone, {
                     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(sels || sels.length){
             
             // if editorgrid.. 
             
index ae29202..39425ee 100644 (file)
@@ -1563,7 +1563,7 @@ var w=this.cm.getColumnWidth(this.cellIndex);var A=Math.max(w-this.grid.minColum
 // Roo/grid/GridDragZone.js
 Roo.grid.GridDragZone=function(A,B){this.view=A.getView();Roo.grid.GridDragZone.superclass.constructor.call(this,this.view.mainBody.dom,B);if(this.view.lockedBody){this.setHandleElId(Roo.id(this.view.mainBody.dom));this.setOuterHandleElId(Roo.id(this.view.lockedBody.dom));
 }this.scroll=false;this.grid=A;this.ddel=document.createElement('div');this.ddel.className='x-grid-dd-wrap';};Roo.extend(Roo.grid.GridDragZone,Roo.dd.DragZone,{ddGroup:"GridDD",getDragData:function(e){var t=Roo.lib.Event.getTarget(e);var A=this.view.findRowIndex(t);
-var sm=this.grid.selModel;if(sm.getSelectedCell){if(!sm.getSelectedCell()){return false;}if(A!=sm.getSelectedCell()[0]){return false;}}var B=sm.getSelections?sm.getSelections():(sm.getSelectedCell()?[this.grid.ds.getAt(sm.getSelectedCell()[0])]:[]);if(B){if(e.hasModifier()){sm.handleMouseDown(e,t);
+var sm=this.grid.selModel;if(sm.getSelectedCell){if(!sm.getSelectedCell()){return false;}if(A!=sm.getSelectedCell()[0]){return false;}}var B=sm.getSelections?sm.getSelections():(sm.getSelectedCell()?[this.grid.ds.getAt(sm.getSelectedCell()[0])]:[]);if(B||B.length){if(e.hasModifier()){sm.handleMouseDown(e,t);
 }Roo.log("getDragData");return {grid:this.grid,ddel:this.ddel,rowIndex:A,selections:sm.getSelections?sm.getSelections():(sm.getSelectedCell()?[this.grid.ds.getAt(sm.getSelectedCell()[0])]:[])};}return false;},onBeforeDrag:function(A,e){return A!==false;},onInitDrag:function(e){var A=this.dragData;
 this.ddel.innerHTML=this.grid.getDragDropText();this.proxy.update(this.ddel);},afterRepair:function(){this.dragging=false;},getRepairXY:function(e,A){return false;},onEndDrag:function(A,e){},onValidDrop:function(dd,e,id){this.hideProxy();},beforeInvalidDrop:function(e,id){}
 });