[AC-2544] Drag and Drop Bug in 3.1.3
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-12-29T19:48:00.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Documentation, Titanium SDK & CLI |
Labels | 3.1.3, android, drag, dragging, drop, ios |
Reporter | Fred App |
Assignee | Shak Hossain |
Created | 2013-11-26T11:23:38.000+0000 |
Updated | 2016-03-08T07:41:36.000+0000 |
Description
Hi everybody,
I have a problem for drag and drop a simple view (or image) in a window.
Even the script of KitchenSink doesn't work. The animation of the circle, is jerky and no smoothie.
Someone has a solution for this problem?
Thank you very much.
Code :
var win = Ti.UI.createWindow({
backgroundColor : "#fff"
});
var X,Y,top,left;
var viewToDrag = Ti.UI.createView({
top : 30,
left : 30,
height : 50,
width : 50,
backgroundColor : 'red'
});
win.add(viewToDrag);
viewToDrag.addEventListener('touchstart', function(e) {
X = e.x;
Y = e.y;
});
viewToDrag.addEventListener('touchmove', function(e) {
left = e.x - X;
top = e.y - Y;
});
viewToDrag.addEventListener('touchend', function(e) {
viewToDrag.left = left;
viewToDrag.top = top;
});
win.open();
Nobody for help me please ? :(
Hello, There is sample available in github that works for me. Can you lease visit this [Drag and Drop Link](https://gist.github.com/rakhimonimitro/7509271). Please let us know if this solves your issue. Thanks
[~fred] Please let us know if you got a chance to try the code available in the link above and if you can still reproduce the issue.
Marking this "Cannot reproduce" since we could not reproduce it. We have not heard back from the original reporter either. A sample has been posted. If you can send us your sample, we will try to reproduce it again.