Fluid Infusion

Reorderer should provide callbacks for a variety of interesting moments

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 0.1, 0.3, 0.4beta1, 0.4
  • Fix Version/s: 0.5
  • Component/s: Reorderer
  • Labels:
    None

Description

At the moment, the Reorderer provides a single callback: the orderChangedCallback. It is fired whenever the user has finished dropping an item.

However, there are a variety of interesting moments that should have callbacks:

 * afterGrab(grabbedElement)
 * afterMove(droppedElement)
 * onSelect(selectedElement)

Other delegate-style predicate functions would be helpful to allow users to override the Reorderer's default behaviour?

 * shouldSelect()
 * shouldMove()

It would also be helpful if the orderChangedCallback was given a list of the new order of elements, saving users the effort of walking the DOM for simple cases.


dev-iteration43

Issue Links

Activity

Hide
Antranig Basman added a comment - - edited
As of revision 5530 event architecture is now generalised (see Fluid.js "mergeListeners" and "instantiateFirers" ) and it will be easy to freely add new "moments".
Show
Antranig Basman added a comment - - edited As of revision 5530 event architecture is now generalised (see Fluid.js "mergeListeners" and "instantiateFirers" ) and it will be easy to freely add new "moments".
Hide
Antranig Basman added a comment -
Fixed at revision 5572. As of this revision the current set of supported events reads as follows:
           onShowKeyboardDropWarning: null,
           onSelect: null,
           onBeginMove: "preventable",
           onMove: null,
           afterMove: null,
           onHover: null

This can be duly expanded but should be sufficient to be going on with. afterMove reports as well as the moving item, its target position and the complete list of movables.
Show
Antranig Basman added a comment - Fixed at revision 5572. As of this revision the current set of supported events reads as follows:            onShowKeyboardDropWarning: null,            onSelect: null,            onBeginMove: "preventable",            onMove: null,            afterMove: null,            onHover: null This can be duly expanded but should be sufficient to be going on with. afterMove reports as well as the moving item, its target position and the complete list of movables.
Hide
Michelle D'Souza added a comment -
Closing issues that were resolved for 1.0 and earlier releases.
Show
Michelle D'Souza added a comment - Closing issues that were resolved for 1.0 and earlier releases.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
3d
Original Estimate - 3d
Remaining:
3d
Remaining Estimate - 3d
Logged:
Not Specified
Time Spent - Not Specified