Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

To drag and drop (or not)

So, I've tried implementing drag and drop on iPhone with the following code, as suggested in this post

c1 = 0;
//Box is a box to be dragged
box.addEventListener("touchmove", function(e){
    if(c1 % 5 == 0){
        e.source.animate({center:{x:e.x,y:e.y}, duration:0});
    }
    c1++;        
});

The results are functional but not attractive or smooth at all. This leads me to wonder: is Titanium is up to the task of drag and drop? Especially with multitouch dragging, it lags quite a bit. Is there something special that needs to be done or perhaps something being worked out for the future that will handle this?

thx,

hdez

— asked May 24th 2010 by Rafael Hernandez
  • iphone
2 Comments
  • I am having this same problem with android

    — commented August 29th 2010 by Aidan Grant
  • Still no answer?

    — commented November 9th 2012 by Sergio Trevino

1 Answer

  • Apparently the API for touchmove etc is very buggy. I have asked for help numerous times. I have even requested help from the Tech team but nothing. I have some simple View and ImageView animations, and they sporadically jump all around the screen or keep repeating themselves countless times.

    I have given up and gone to Corona!

    — answered August 26th 2011 by Jason Brock
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.