ractive-drag-and-drop-files

1.0.0 • Public • Published

A Ractive wrapper/fork of https://github.com/mikolalysenko/drag-and-drop-files

Seriously it's nearly identical

var dragDropFiles = require('ractive-drag-and-drop-files')

var ractive = new Ractive({
	el: '#container',
	template: '<div on-dragdropfiles="drag-file">{{text}}</div>',
	data: {
		text: 'Drag me!'
	},
	events: {
		dragdropfiles: dragDropFiles
	}
})

ractive.on('drag-file', function(event) {
	var files = event.files
	console.log(files)
}

Readme

Keywords

none

Package Sidebar

Install

npm i ractive-drag-and-drop-files

Weekly Downloads

13

Version

1.0.0

License

WTFPL

Last publish

Collaborators

  • tehshrike