1 Ext.define('Ext.tree.ViewDragZone', {
2 extend: 'Ext.view.DragZone',
4 isPreventDrag: function(e, record) {
5 return (record.get('allowDrag') === false) || !!e.getTarget(this.view.expanderSelector);
8 afterRepair: function() {
11 selectedRowCls = view.selectedItemCls,
12 records = me.dragData.records,
15 if (Ext.enableFx && me.repairHighlight) {
16 // Roll through all records and highlight all the ones we attempted to drag.
17 Ext.Array.forEach(records, function(record) {
18 // anonymous fns below, don't hoist up unless below is wrapped in
19 // a self-executing function passing in item.
20 var item = view.getNode(record);
22 // We must remove the selected row class before animating, because
23 // the selected row class declares !important on its background-color.
24 fly(item.firstChild).highlight(me.repairHighlightColor, {
26 beforeanimate: function() {
27 if (view.isSelected(item)) {
28 fly(item).removeCls(selectedRowCls);
31 afteranimate: function() {
32 if (view.isSelected(item)) {
33 fly(item).addCls(selectedRowCls);