ovidiuch/dragdealer

dragStartCallback / dragStopCallback not working?

Closed this issue · 5 comments

Hi,

I'm not sure if I missed something but looks like those events aren't working.

This is my code:

    drag = new Dragdealer('drag_'+container_id, {
      animationCallback: function(x, y) {
        // doing some cool stuff here
      },
      dragStartCallback: function(x, y) {
        console.log('drag start');
      },
      dragStopCallback: function(x, y) {
        console.log('drag stop');
      },
      steps: 2,
      speed: 0.50
    });

Are you testing with the latest Dragdealer version? This is the line that triggers the dragStart event: https://github.com/skidding/dragdealer/blob/master/src/dragdealer.js#L547

I'm using the lastest version, looks like those callbacks aren't implemented in this version :P

https://github.com/skidding/dragdealer/blob/0.9.8/src/dragdealer.js#L547

Right. You should be using the unreleased 0.9.9 version :P https://github.com/skidding/dragdealer/blob/master/src/dragdealer.js

Thank you @skidding

Now I'm using the latest (master).

Everything working like a charm! :D

🆒