PDA

View Full Version : Custom drag with DDproxy



Bouki
30 Dec 2010, 4:33 AM
Hi
I'm new to extjs and I would like to know how to make a custom dragging
Here is my case :



<div id = "content" style = "background: #09F; width: 400px; height: 300px;">
<div id = "dragzone" style = "background: #F00;">AAAAAAAAAAAAAAAAAA</div>
BBBBBBBBBBBBBBBBBBBBBBBB
</div>The div "dragzone" should be the draggable area, but it's the div "content" that should be dragged

So here is what I've tried :



Ext.onReady(function() {
Ext.get('dragzone').initDDProxy(null, {dragElId: 'content'});
});
However this produces a very very strange behaviour, the div content loss its css and disappear after dragging

Is this a bug or am I using the wrong syntax ?

Thanks for any help

skirtle
30 Dec 2010, 2:25 PM
Try this:


Ext.get('content').initDDProxy().setHandleElId('dragzone');