0.2.0 • Published 9 years ago
hr.dnd v0.2.0
hr.dnd
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 });