- colHeaderCls: Ext.baseCSSPrefix + 'column-header',
- maxProxyWidth: 120,
-
- constructor: function(headerCt) {
- this.headerCt = headerCt;
- this.ddGroup = this.getDDGroup();
- this.callParent([headerCt.el]);
- this.proxy.el.addCls(Ext.baseCSSPrefix + 'grid-col-dd');
+ containerScroll: false,
+
+ constructor: function(config) {
+ var me = this;
+
+ Ext.apply(me, config);
+
+ // Create a ddGroup unless one has been configured.
+ // User configuration of ddGroups allows users to specify which
+ // DD instances can interact with each other. Using one
+ // based on the id of the View would isolate it and mean it can only
+ // interact with a DropZone on the same View also using a generated ID.
+ if (!me.ddGroup) {
+ me.ddGroup = 'view-dd-zone-' + me.view.id;
+ }
+
+ // Ext.dd.DragDrop instances are keyed by the ID of their encapsulating element.
+ // 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
+ // 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]);
+
+ me.ddel = Ext.get(document.createElement('div'));
+ me.ddel.addCls(Ext.baseCSSPrefix + 'grid-dd-wrap');