CableDawg
20 Jun 2007, 11:39 AM
If you create a DragZone in a document with:
<div id="constraint" style="width: 650px; height: 350px;">[Organizer Layout]</div>
and then call:
dragZone.constrainTo('constraint')
The Proxy element will get constrained to something completely inconsistent with the dimensions of the "constraint" element.
For an example, please see an implementation of the Ext Tutorial's Image Organizer with constraints added:
http://luddite.net/derek/test/organizer.html
When you drag the image thumbnail, the proxy element gets locked into a box approximately 318px wide and 103px tall. It should appear to be constrained to the dimensions of the Layout element.
Overall, I think there are quite a few flaws lurking within DragZone (and maybe some other DD elements as well). The code just doesn't seem to be quite as well formatted and thought out as the rest of the framework. For example, sometimes "this.el" is used whereas other methods use the local getEl() method. One method even assigns the results of a getEl call to a local "el" variable and then never uses that variable anywhere in the method (showFrame method, DDCore.js, line 2854.)
See my post here http://extjs.com/forum/showthread.php?t=7993 for more information.
Unless you are using a widget (like Tree or Grid) that has built-in DD support, getting the DD stuff to work on its own is very difficult and frustrating. Since there seem to be several posts of very confused users with very little resolution, I think some more time needs to be spent on fleshing out the DD support and maybe even a few tutorials written. I have spent 3 days going over this DragZone stuff and I'm still completely baffled as to how it all works .
<div id="constraint" style="width: 650px; height: 350px;">[Organizer Layout]</div>
and then call:
dragZone.constrainTo('constraint')
The Proxy element will get constrained to something completely inconsistent with the dimensions of the "constraint" element.
For an example, please see an implementation of the Ext Tutorial's Image Organizer with constraints added:
http://luddite.net/derek/test/organizer.html
When you drag the image thumbnail, the proxy element gets locked into a box approximately 318px wide and 103px tall. It should appear to be constrained to the dimensions of the Layout element.
Overall, I think there are quite a few flaws lurking within DragZone (and maybe some other DD elements as well). The code just doesn't seem to be quite as well formatted and thought out as the rest of the framework. For example, sometimes "this.el" is used whereas other methods use the local getEl() method. One method even assigns the results of a getEl call to a local "el" variable and then never uses that variable anywhere in the method (showFrame method, DDCore.js, line 2854.)
See my post here http://extjs.com/forum/showthread.php?t=7993 for more information.
Unless you are using a widget (like Tree or Grid) that has built-in DD support, getting the DD stuff to work on its own is very difficult and frustrating. Since there seem to be several posts of very confused users with very little resolution, I think some more time needs to be spent on fleshing out the DD support and maybe even a few tutorials written. I have spent 3 days going over this DragZone stuff and I'm still completely baffled as to how it all works .