Hey guys I'm working on a class that is a kind of an upgrade on Sortables by Tom Occhino.
You can see a simple demo here: http://mootools.net/shell/79MrA/ My main aims are to: - make elements both sortable and draggable to additional targets outside of sortables wrapper - make it look better than Tom's class (animated sorting etc.) The class is working now (tested in Safari 4, FF3.6 & IE8) but I've got some problems that could be either my fault or mootools bugs and I hope you could help me out: 1. When a draggable item contains any element with opacity CSS property, it can't be clicked because the element with opacity 'jumps' in front of it on click. See the demo, there are 3 rows of items, first contains no opacity and is clickable, in the second images are semi-transparent and thus non-clickable and the last one shows that even if the element with opacity is hidden behind some other element, it will jump to front and block the click. Seriously, WTF? 2. I use something like clone.setStyles(element.getStyles('[..styles I need..]')) to clone element with its styles and make it independent of its container. Is there any better way to do that or a native cloneWithStyles func? There are some problems with this approach: 3. getStyles() doesn't get the float property, I think it's a reported mootools bug so I worked it around (lines 260-266 in draggr.js), this solution doesn't work in IE8 though. Do you know any better way to fix it? 4. Speaking of IE, when I include border in getStyles (eg. getStyles('border')) IE8 throws an Invalid Argument error in mootools core 5. Also, when you sort one of first items in a row you will notice that elements after the one moved will 'shake' during animation, the sorting animation is created by two invisible elements placed on sides of current 'sliding' box, one of the two is animating from 0 to 80px wide, the other one 80->0. In theory there should be no shaking as they're both animating in the same time so overall width of the area remains constant at 160px, but theory is just theory and it looks like a jelly while animating. Is there any way to 'synchronize' both animations and avoid the shake effect? All comments welcome (also for other parts of code). Cheers! Matt
