Skip to content

Commit

Permalink
Add note about mobile support. Closes james2doyle#2.
Browse files Browse the repository at this point in the history
  • Loading branch information
james2doyle committed Feb 13, 2016
1 parent d484d96 commit 6fc1b94
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ A directive for providing drag and drop capabilities to elements and data.

Available through `npm install vue-drag-and-drop` or include as an inline script, like in `example.html`.

### Mobile Support

This library simply wraps the native drag and drop in html5. There is no support, and probably never will be any, for native "drag and drop" on mobile. See this [chart](http://caniuse.com/#feat=dragndrop).

The reason for this is that touch devices already have the necessary events (touch events) to implement drag and drop without need the additional apis that the desktop drag and drop has.

If you need a cross-platform solution, you should check out [this awesome library called pep!](http://pep.briangonzalez.org/).

### Demo

![demo gif](http://cl.ly/2B3j0g2K412y/Screen%20Recording%202015-12-09%20at%2009.23%20PM.gif)
Expand Down Expand Up @@ -37,4 +45,4 @@ this.tasks.$set(dropppedOnElement.id, placeholder);

You can use whatever you want for the `$index` attribute. Maybe you want to use `data-index`? Then just use `draggedElement.getAttribute('data-index')` to grab the index for that item in your data.

You can see a `Vue` instance in `example.html` if you want more details.
You can see a `Vue` instance in `example.html` if you want more details.

0 comments on commit 6fc1b94

Please sign in to comment.