nextdigital
30 Nov 2009, 7:17 PM
Ext.onReady(function(){
var drop = new Ext.Panel({
region: 'center'
});
drop.on('render',function(){
drop.dd = new Ext.dd.DropTarget(drop.getEl(),{
ddGroup: 'myGroup',
notifyDrop: function(source,e,data){
return true;
}
});
});
var view = new Ext.Viewport({
layout: 'fit',
items: [drop]
});
var panel = new Ext.Panel({
width: 80,
height: 80,
html: '<center>DRAG ME</center>'
});
panel.on('render',function(){
panel.dd = new Ext.dd.DragSource(panel.getEl(),{
ddGroup: 'myGroup'
});
});
var win = new Ext.Window({
title: 'Floating Window',
width: 400,
height: 350,
items: [panel]
});
win.show();
});
In the above example, you'll notice that if you drag the 'DRAG ME' panel over the floating window, the 'drop' panel will still accept the drop... I believe this to be unexpected behaviour for the user.
if this is not a bug, please provide an explanation as to why, or better yet a workaround that will make it perform as the user would expect.
var drop = new Ext.Panel({
region: 'center'
});
drop.on('render',function(){
drop.dd = new Ext.dd.DropTarget(drop.getEl(),{
ddGroup: 'myGroup',
notifyDrop: function(source,e,data){
return true;
}
});
});
var view = new Ext.Viewport({
layout: 'fit',
items: [drop]
});
var panel = new Ext.Panel({
width: 80,
height: 80,
html: '<center>DRAG ME</center>'
});
panel.on('render',function(){
panel.dd = new Ext.dd.DragSource(panel.getEl(),{
ddGroup: 'myGroup'
});
});
var win = new Ext.Window({
title: 'Floating Window',
width: 400,
height: 350,
items: [panel]
});
win.show();
});
In the above example, you'll notice that if you drag the 'DRAG ME' panel over the floating window, the 'drop' panel will still accept the drop... I believe this to be unexpected behaviour for the user.
if this is not a bug, please provide an explanation as to why, or better yet a workaround that will make it perform as the user would expect.