X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..f562e4c6e5fac7bcb445985b99acbea4d706e6f0:/docs/source/DragZone3.html diff --git a/docs/source/DragZone3.html b/docs/source/DragZone3.html index 138fc16f..4abcfd4d 100644 --- a/docs/source/DragZone3.html +++ b/docs/source/DragZone3.html @@ -3,8 +3,8 @@ The source code - - + + @@ -42,7 +42,7 @@ Ext.define('Ext.view.DragZone', { // So a View's DragZone cannot use the View's main element because the DropZone must use that // because the DropZone may need to scroll on hover at a scrolling boundary, and it is the View's // main element which handles scrolling. - // We use the View's parent element to drag from. Ideally, we would use the internal structure, but that + // We use the View's parent element to drag from. Ideally, we would use the internal structure, but that // is transient; DataView's recreate the internal structure dynamically as data changes. // TODO: Ext 5.0 DragDrop must allow multiple DD objects to share the same element. me.callParent([me.view.el.dom.parentNode]); @@ -62,6 +62,12 @@ Ext.define('Ext.view.DragZone', { onItemMouseDown: function(view, record, item, index, e) { if (!this.isPreventDrag(e, record, item, index)) { this.handleMouseDown(e); + + // If we want to allow dragging of multi-selections, then veto the following handlers (which, in the absence of ctrlKey, would deselect) + // if the mousedowned record is selected + if (view.getSelectionModel().selectionMode == 'MULTI' && !e.ctrlKey && view.getSelectionModel().isSelected(record)) { + return false; + } } }, @@ -102,7 +108,7 @@ Ext.define('Ext.view.DragZone', { // Update the selection to match what would have been selected if the user had // done a full click on the target node rather than starting a drag from it if (!selectionModel.isSelected(record) || e.hasModifier()) { - selectionModel.selectWithEvent(record, e); + selectionModel.selectWithEvent(record, e, true); } data.records = selectionModel.getSelection();