Tutorial talk:Advanced Custom Drag and Drop Part 1 (Legacy)
This version of our Learning Center is unmaintained.
This article may be out-of-date or contain incorrect information.
Please visit the new Sencha Learning Center for up-to-date material.
From Sencha - Learn
Say I want to save on my event listeners, and I do the following instead:
<div id="container"> <div class="dd-ct" id="dd1-ct"> <div class="dd-item" id="dd1-item1">Item 1.1</div> <div class="dd-item" id="dd1-item2">Item 1.2</div> </div> <div class="dd-ct" id="dd2-ct"> <div class="dd-item" id="dd2-item1">Item 2.1</div> <div class="dd-item" id="dd2-item2">Item 2.2</div> </div> </div>
So, I have added a container around my dragdropzones.
So my dragZone1 initialization now becomes:
dragZone1 = new Tutorial.dd.MyDragZone('container', { ddGroup: 'group', scroll: false });
And my dragData extension is:
getDragData: function(e) { var target = Ext.get(e.getTarget('.dd-item')); if (target) { return {ddel:this.ddel, item:target}; } else { return false; } }
Why is this not enough for it to work? It finds the target as before, and finds the 'div' as the ddel, but I can't drag the element, and onInitDrag doesn't fire either?
This page was last modified on 19 September 2007, at 11:56.
This page has been accessed 4,120 times.
