所以我有多个Ext.dd.DragSource
和Ext.dd.DropTarget
对象。为了获得我需要的正确行为,我将逻辑附加到这两个对象上的事件中。不可能只将所有逻辑附加到拖放。
我的问题是,当我设置onDragOut
和onDragEnter
拖动对象时,它们会停止notifyEnter
和notifyOut
触发放置对象。
有没有办法让这两个事件都触发?
var ds = new Ext.dd.DragSource(id, { ddGroup: 'drops' });
ds.onDragEnter = function (e, id) { console.log('Drag Enter'); }
ds.onDragOut = function (e, id) { console.log('Drag Exit'); }
var dt = new Ext.dd.DropTarget(id, { ddGroup: 'drops' });
// These never fire.
dt.notifyEnter = function (source, evt, data) { console.log('Drop Enter'); }
dt.notifyOut = function (source, evt, data) { console.log('Drop Exit'); }
我正在使用 Extjs 4.0.2a,不幸的是,我目前仍坚持使用这个版本。对此的任何帮助都会很棒。