ichti-git / vue-draggabilly

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

access to draggabilly instance #1

Open z1haze opened 7 years ago

z1haze commented 7 years ago

How do you get access to the draggabilly instance in the in dragStart, etc handlers?

Normally the context of this inside of that handler is the draggabilly object, but i dont see anything that shows how to get it from your directive.

ichti-git commented 7 years ago

Yes. The callback can actually take 3 arguments, where the first is the draggabilly instance. onDrag: function(draggie, event, pointer) { ... }

You can try that, it seems that how I did it myself. But I'm not 100% sure.

z1haze commented 7 years ago

According to the docs that is not what the callbaxk receives. Can you elaborate on this? Docs show, event, pointer, and vector path or whatever it's called. Mom are the instance of the drag object I checked

Sent from my iPhone

On Sep 5, 2017, at 4:22 AM, Simon Tougaard notifications@github.com wrote:

Yes. The callback can actually take 3 arguments, where the first is the draggabilly instance. onDrag: function(draggie, event, pointer) { ... }

You can try that, it seems that how I did it myself. But I'm not 100% sure.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.