Maslosoft Framework Logo Maslosoft Framework Documentation
Flexible Application Foundation


Dropped

Dropped helper allow easier interaction with dropable elements. This provides dropped model instance as well as targeting different parts of drop target, together with target model instance.

Using Dropped

var dropped = new app.util.Dropped(event, ui);

// Check if dropped on specified element
if(dropped.on('.selector')){
    // Instance of dropped model
    dropped.model;

    // Instance of model on which drop event occurred
    dropped.target;

    // KO context of target
    dropped.context

    // KO index of target if applicable
    dropped.index
}