Config
Table of Contents

Mixin

O.Draggable

The Draggable mixin should be applied to views you wish to make draggable. Override the methods to get the callbacks you're interested in.

"use strict";

( function ( NS ) {

NS.Draggable = {

Property

O.Draggable#isDraggable

  • Boolean

Identifies the view as draggable.

isDraggable: true,

Property

O.Draggable#isDragging

  • Boolean

True if the view is currently being dragged.

isDragging: false,

Method

O.Draggable#dragStarted( drag )

Called when a drag is initiated with this view.

Parameters

dragO.Drag The drag instance.
dragStarted: function (/* drag */) {},

Method

O.Draggable#dragMoved( drag )

Called when a drag initiated with this view moves.

Parameters

dragO.Drag The drag instance.
dragMoved: function (/* drag */) {},

Method

O.Draggable#dragEnded( drag )

Called when a drag initiated with this view finishes (no matter where on screen it finishes). This method is guaranteed to be called, if and only if dragStarted was called on the same view.

Parameters

dragO.Drag The drag instance.
dragEnded: function (/* drag */) {}
};

}( O ) );
Animation
Application
Core
DataStore
DOM
DragDrop
Foundation
IO
Localisation
Selection
Parser
TimeZones
Storage
Touch
CollectionViews
UA
ContainerViews
ControlViews
PanelViews
View