0.2.0 • Published 9 years ago

hr.dnd v0.2.0

Weekly downloads
13
License
-
Repository
github
Last release
9 years ago

hr.dnd Build Status

Drag and drop utility

Installation

$ npm install hr.dnd

Documentation

var dnd = require("hr.dnd");

// Create a draggable type
var type = new dnd.DraggableType();

// Create a drop area
var drop = new dnd.DropArea({
    view: yourView,
    dragType: type
});

// Get data when dropped
drop.on("drop", function(data) {

});


// Enable drag for a view for "type"
type.enableDrag({ view: elementToDragView });