PDA

View Full Version : Dragged Panel in Internet Explorer



Tobsen
8 Apr 2008, 12:35 AM
Hey guys,

Does anyone of you maybe know, how you can scale a dragged panel. It

rudytheng
8 Apr 2008, 12:59 AM
could you show your code?

Tobsen
8 Apr 2008, 1:32 AM
I think the code, that matters is where I define the dragsource:



items[i] = new Ext.Panel({
id : 'item' + id,
title : icon + ' ' + title,
html : thumbnail,
listeners : {
render : function(g) {

var dragElement = new Ext.dd.DragSource(g.getEl(),
{
copy : false,
isTarget : false,
ddGroup : 'test',
getDragData : function(e) {
var target = Ext.get(e.getTarget());

return {

element : g,
item : target
};
}

});
}
}

});


It

Tobsen
14 Apr 2008, 4:11 AM
I managed the width problem in Internet Explorer. I just had to overwrite the startDrag() methode and to set the width from the original element:


startDrag: function(x, y)
{
var dragEl = Ext.get(this.getDragEl());
var el = Ext.get(this.getEl ());

dragEl.applyStyles({border:'',
'z-index':2000,
width: el.getWidth()
});

dragEl.update (el.dom.innerHTML);
dragEl.addClass(el.dom.className + ' dd-proxy');
},


Unfortunately I still got no (cross) icon when I