pec1985 / TiDraggable

Native iOS and Android modules for Appcelerator's Titanium Mobile
74 stars 75 forks source link

Delayed end event occurs on IOS device #16

Open chrisribe opened 10 years ago

chrisribe commented 10 years ago

Hi first of all great module !

I am having an issue where the end event is fired with a slight delay (1-2 seconds) but only sometimes. This does not occur on the simulator which works perfectly.

 uCard.addEventListener('end', function(e)
 {
   Ti.API.info("end !!");
   //Reset pos workaround ! see issue #14
   e.source.setLeft(e.source.left);
   e.source.setTop(e.source.top);

   //Bounce back to a certain position on end   
        var a Ti.UI.createAnimation({top: 15, left: 15});
     e.source.animate(a);
 });

Could the issue be related to my workaround ? Thanks