Mojo.Drag

Namespace Detail

Method Summary


Method Detail

Mojo.Drag.setupDropContainer(element, dropClient)

Configures given element to be available as a valid destination for drag-and-drop items.

Parameters


Mojo.Drag.startDragging(sceneController, element, startEvent, options)

This function can be used to start dragging an element, and returns an active "dragger" object. This usually happens when the mouse is down, and maybe before the dragStart event actually occurs. In some cases, it's called when a hold event occurs (for stuff dragged on a push-and-hold), and in other cases, it's called on mousedown or dragStart.

The dragger sets things up for dragging, and prevents the drag from causing the scene to be scrolled. Both dragEnd and tap events will cause the drag operation to end, since dragStart/dragEnd events may never occur if there are no mousemove events. This sort of "aborted" drag operation is treated like any other, and will still cause the appropriate enter and drop methods to be called on the container.

Parameters