MooTools versus Script.aculo.us

Page 3 - Comparing Drag and Drop

Skip to navigation

Drag and Drop is something that is known to be buggy in both cases; particularly when it comes to dragging and dropping, or sorting within scrollable divs. This is something that is fixable, at least in Script.aculo.us, by taking into account the scroll position of the DIV when you are dragging (this means editing dragdrop.js).

Table comparing what effects are featured in each framework
Property MooTools Script.aculo.us
Ability to drag anywhere X X
Revert after dragging - X
Horizontal sorting - X
Vertical sorting X X
Specification of handles X X
Firing of events based on state X X
Draggable Boundaries X X
Snap to Grid X -
Resizable X -
Fig 3. Drag and Drop comparison of frameworks

In the case of boundaries, both frameworks treat this slightly different. Script.aculo.us will allow the specification of a constraint to allow only horizontal/vertical movement on sortables; but nothing more specific. With MooTools you are able to specify the x and y boundaries for any type of draggable.

Horizontal sorting is a dodgy thing in both cases due to how they interact with floats. It is however possible to get it working in Script.aculo.us (but with some minor bugs still); though MooTools seems to fail horribly at the attempt - especially if the floating items are different heights.

Best Drag / Drop support: DRAW!