Places:Drag & Drop: Difference between revisions

No edit summary
 
Line 10: Line 10:
== Controller Drop Handling Helper ==
== Controller Drop Handling Helper ==


The PlacesControllerDragHelper provides an <code>onDrop</code> method that performs view-agnostic drop handling. This method performs the following actions:
The <code>PlacesControllerDragHelper</code> provides an <code>onDrop</code> method that performs view-agnostic drop handling. This method performs the following actions:


# Determine what mime types of objects are being dragged (from the dragged transferable), and compares this list of types supported as droppable by the target view (<code>peerDropTypes, childDropTypes</code>).
# Determine what mime types of objects are being dragged (from the dragged transferable), and compares this list of types supported as droppable by the target view (<code>peerDropTypes, childDropTypes</code>).
# For each dropped item, unwrap the data, generate insertion or copy transactions, and execute the transactions on the transaction manager.
# For each dropped item, unwrap the data, generate insertion or copy transactions, and execute the transactions on the transaction manager.
525

edits