PDA

View Full Version : Drag from pop up window to panel



kavyakn
29 May 2013, 10:37 PM
I have a tree panel within a pop up window and I am dragging a tree node from popup window to panel behind the pop up window. The issue is drag text recognises the dom of the panel behind the window and changes the default icon ( red) to green before entering the panel . How do I prevent this ?

slemmon
31 May 2013, 12:07 PM
I'm having trouble creating a test case to demonstrate the issue. Below is my attempt. Can you edit it or provide your own to show the issue you're seeing?



var store = Ext.create('Ext.data.TreeStore', {
root: {
expanded: true,
children: [
{ text: "detention", leaf: true },
{ text: "homework", expanded: true, children: [
{ text: "book report", leaf: true },
{ text: "algebra", leaf: true}
] },
{ text: "buy lottery tickets", leaf: true }
]
}
});


var store2 = Ext.create('Ext.data.TreeStore', {
root: {
expanded: true,
children: [
{ text: "detention", leaf: true },
{ text: "homework", expanded: true, children: [
{ text: "book report", leaf: true },
{ text: "algebra", leaf: true}
] },
{ text: "buy lottery tickets", leaf: true }
]
}
});


Ext.create('Ext.tree.Panel', {
title: 'Simple Tree',
width: 200,
height: 150,
store: store,
rootVisible: false,
renderTo: Ext.getBody(),
viewConfig: {
plugins: 'treeviewdragdrop',
ddGroup: 'ddGroup'
}
});


Ext.widget('window', {
width: 200,
height: 150,
x: 40,
y: 0,
layout: 'fit',
items: [{
xtype: 'treepanel',
title: 'Simple Tree',
store: store2,
rootVisible: false,
renderTo: Ext.getBody(),
viewConfig: {
plugins: 'treeviewdragdrop',
ddGroup: 'ddGroup'
}
}]
}).show();