-
10 Feb 2012 9:28 PM #1
[4.1 b2] - Tree Drag n Drop - Broken ...
[4.1 b2] - Tree Drag n Drop - Broken ...
I have a situation where drag n drop for nodes within a tree is broken. When ExtJS internally calls getPosition on the ViewDropZone
record = view.getRecord(node)
can not find a record. It has been working before. I do not have a workaround yet. At the moment I do not have a small example to reproduce the problem and to post here. I'll try my best.
Any idea if this problem is already known, has a workaround or even a solution.
-
12 Feb 2012 6:52 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
Would need more info... the drag and drop example that comes with the b2 release is working so it'd be hard to know what is going on for you.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
13 Feb 2012 12:22 PM #3
I use two trees in an accordion layout. Here I simply combined two examples from the documentation.
To reproduce the problem: load the page, drag n drop node 1 to node 3 on first accordion panel (this works), then open second accordion panel (it works), drag n drop node 1 to node 3 on second accordion panel (does not work and produces error in console). [FF 9.0.1, ExtJS 4.1beta2]
Code:Ext.create('Ext.panel.Panel', { title: 'Accordion Layout', width: 300, height: 300, layout:'accordion', defaults: { // applied to each contained panel bodyStyle: 'padding:15px' }, layoutConfig: { // layout-specific configs go here titleCollapse: false, animate: true, activeOnTop: true }, items: [ { xtype: 'treepanel', title: 'Simple Tree', viewConfig: { plugins: { ptype: 'treeviewdragdrop', appendOnly: true } }, root: { text: 'Root', expanded: true, children: [ { text: 'Child 1', leaf: true }, { text: 'Child 2', leaf: true }, { text: 'Child 3', expanded: true, children: [ { text: 'Grandchild', leaf: true } ] } ] } }, { xtype: 'treepanel', title: 'Simple Tree', viewConfig: { plugins: { ptype: 'treeviewdragdrop', appendOnly: true } }, root: { text: 'Root', expanded: true, children: [ { text: 'Child 1', leaf: true }, { text: 'Child 2', leaf: true }, { text: 'Child 3', expanded: true, children: [ { text: 'Grandchild', leaf: true } ] } ] } } ], renderTo: Ext.getBody() });
-
14 Feb 2012 10:43 AM #4
A workaround and a best guess if a fix will make it into beta-3 would be absolutely great. I migrated an application from 4.0.6 to 4.1-b2 and this is the only bug that I can not workaround at the moment. Therefore a workaround would really help me! Thanks.
P.S. I am really keen on running on 4.1 :-)
-
17 Feb 2012 12:22 AM #5
Any idea?
-
17 Feb 2012 4:41 AM #6
I'm going to move this to the bugs forum. It works fine against 4.0.7 but not against the latest 4.1-beta code.
It's only with an accordion that the problem occurs. If I switch it to a vbox or tabpanel it doesn't throw the error.
I've simplified the test case a little:
Drag/drop works on the first tree but not the second tree.Code:Ext.onReady(function() { Ext.create('Ext.panel.Panel', { height: 300, items: [createTree(), createTree()], layout: 'accordion', renderTo: Ext.getBody(), width: 300 }); function createTree() { return { xtype: 'treepanel', viewConfig: {plugins: {ptype: 'treeviewdragdrop'}}, root: { text: 'Root', expanded: true, children: [ { text: 'Node 1', leaf: true }, { text: 'Node 2', expanded: true, children: [{ text: 'Node 3', leaf: true }] } ] } }; } });
-
17 Feb 2012 4:42 AM #7Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
I have opened a bug ticket for this.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
17 Feb 2012 12:53 PM #8
Thank you :-)
-
22 Feb 2012 2:39 PM #9
Debugging the provided example I see store.data.items.internalId being "ext-record-2" on the second panel while domNodeObject.viewRecordId="ext-record-6". So dom does not "reset counting" for the records as in store.data. Is there something like updateIndexes() on the view missing?
-
24 Feb 2012 2:18 AM #10
Congratulations for solving the problem!
I just tested the nightly-built ext-4.1-20120223.zip. The fix is not in, yet.
Is there a way to access the fix or can you tell when it will be in the nightly-built?
Thanks a lot.
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-5395
in
TBD.


Reply With Quote