View Full Version : Building a custom Drag Proxy to follow the mouse pointer...

24 Sep 2013, 11:38 AM
Hi !. As the title says, I would like to know why If I use the innerHTML of the compBase variable and then asign it to the item property of the object returned byt the getDragData I don't get a custom drag proxy following the mouse !!!... Is there anyother property ?... Cheers

gridp.getView().plugins[0].dragZone.getDragData = function (e) {
var view = this.view,
item = e.getTarget(view.getItemSelector());
var compBase = document.createElement('DIV');

if (item) {
return {
copy: view.copy || (view.allowCopy && e.ctrlKey),
event: new Ext.EventObjectImpl(e),
view: view,
ddel: this.ddel,
item: item,
records: view.getSelectionModel().getSelection(),
fromPosition: Ext.fly(item).getXY()

24 Sep 2013, 11:55 AM
Maybe your element did not get to document's body?

24 Sep 2013, 12:03 PM
Supose I do this...

var compBase = document.createElement('DIV');
compBase.innerHTML = '<b>Agus</b>';

And I assign to the item property, the element as you said doesn't get it to the dom... It keeps using the standard proxy with the text I supplied in the plugin config...