ichti-git / vue-draggabilly

Draggabilly plugin for Vue.js
6 stars 1 forks source link

Draggabilly directive for VueJS.
http://draggabilly.desandro.com/
See the site for all options and events.

Installing with npm:

npm install vue-draggabilly

Using it:

var VueDraggabilly = require('vue-draggabilly');
Vue.use(VueDraggabilly);

No options dragging:

<div v-draggabilly></div>

With options:

<div v-draggabilly="{axis: 'x', handle: '.handle'}"></div>

Event registering:
v-draggabilly-on:eventName="callbackFunction"
v-draggabilly-once:eventName="callbackFunction"

<div v-draggabilly v-draggabilly-on:dragStart="dragstart"></div>
<div v-draggabilly v-draggabilly-on:dragStart="dragstart" v-draggabilly-on:dragMove="movingAround"></div>

Methods not included.