{ "id": "62083", "key": "TIMOB-1451", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-06-22T14:57:21.000+0000", "created": "2011-04-15T02:53:11.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [], "versions": [ { "id": "11225", "name": "Release 1.5.0", "archived": true, "released": true, "releaseDate": "2010-12-14" } ], "issuelinks": [], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T23:32:55.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

This is device only, not being seen using the simulator. Using\r\nthe provided code, fire up the app on an ipad and:

\r\n

Using 1.4.1.7c619b and an ipad running 3.2.

\r\n

1.launch app on device (start in landscape or portrait), file\r\nattached, but code copy pasted below
\r\n2.use your finger to drag the grey square to a new location
\r\n3.use your finger to press on the object then quickly make a\r\ncircle. repeat if need be

\r\n

results: on the second (or third) try, the object will not track\r\nwith the users finger. This does not seem to occur on the first\r\ninteraction.

\r\n

// this sets the background color of the master UIView (when\r\nthere are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');

\r\n

// create tab group var tabGroup =\r\nTitanium.UI.createTabGroup();

\r\n

// // create base UI tab and root window // var win1 =\r\nTitanium.UI.createWindow({

\r\n
\r\ntitle:'Tab 1',\r\nbackgroundColor:'#fff'\r\n
\r\n

}); var tab1 = Titanium.UI.createTab({

\r\n
\r\nicon:'KS_nav_views.png',\r\ntitle:'Tab 1',\r\nwindow:win1\r\n
\r\n

});

\r\n

var label1 = Titanium.UI.createLabel({

\r\n
\r\ncolor:'#999',\r\ntext:'I am Window 1',\r\nfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\ntextAlign:'center',\r\nwidth:'auto'\r\n
\r\n

});

\r\n

win1.add(label1);

\r\n

// // create controls tab and root window // var win2 =\r\nTitanium.UI.createWindow({

\r\n
\r\ntitle:'Tab 2',\r\nbackgroundColor:'#fff'\r\n
\r\n

}); var tab2 = Titanium.UI.createTab({

\r\n
\r\nicon:'KS_nav_ui.png',\r\ntitle:'Tab 2',\r\nwindow:win2\r\n
\r\n

});

\r\n

var label2 = Titanium.UI.createLabel({

\r\n
\r\ncolor:'#999',\r\ntext:'I am Window 2',\r\nfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\ntextAlign:'center',\r\nwidth:'auto'\r\n
\r\n

});

\r\n

win2.add(label2);

\r\n

// // add tabs // tabGroup.addTab(tab1);
\r\ntabGroup.addTab(tab2);

\r\n

// open tab group tabGroup.open();

\r\n

/////////////////////////// NATES CODE ////////////////////

\r\n

var logTable = Ti.UI.createTableView({ borderRadius: 10, data:\r\n[], top: 10, width: 250, rowHeight: 30, right: 10});
\r\nlogTable.height = 300;

\r\n

var logToTable = function(txt){

\r\n
\r\nvar row = Titanium.UI.createTableViewRow({});\r\nvar view = Titanium.UI.createView({height: 20, width: 'auto', left: 0});\r\nvar label = Titanium.UI.createLabel({\r\n    text: txt, height:20, width: 'auto', left: 10,\r\n    font: {fontSize: 10, fontFamily: 'Verdana'}\r\n});\r\nview.add(label);\r\nrow.add(view);\r\n\r\nif( logTable.data.length > 0){\r\n    logTable.insertRowBefore(0, row);\r\n}else{\r\n    logTable.appendRow(row);\r\n}\r\n
\r\n

};

\r\n

var obj = Ti.UI.createView({

\r\n
\r\ntop: 20,\r\nleft: 20,\r\nheight: 200,\r\nwidth: 200,\r\nzIndex: 2,\r\nbackgroundColor: '#ccc',\r\ncenter: {x: 200, y: 200}\r\n
\r\n

});

\r\n

win1.add(obj);
\r\nwin1.add(logTable);

\r\n

var animationOffset = {};
\r\nobj.addEventListener('touchstart', function(e){

\r\n
\r\nanimationOffset.log = [];\r\nanimationOffset.screenHeight = win1.toImage().height;\r\nanimationOffset.screenWidth = win1.toImage().width;\r\nanimationOffset.startingPositionX = obj.center.x;\r\nanimationOffset.startingPositionY = obj.center.y;\r\n\r\nanimationOffset.x = e.x - obj.width/2;\r\nanimationOffset.y = e.y -  obj.width/2;\r\n\r\nanimationOffset.lastX = e.x + obj.animatedCenter.x - obj.width/2;\r\nanimationOffset.lastY = e.y + obj.animatedCenter.y - obj.height/2;\r\nanimationOffset.lastX = animationOffset.lastX - animationOffset.x;\r\nanimationOffset.lastY = animationOffset.lastY - animationOffset.y;\r\n\r\nanimationOffset.log.push('------');\r\nanimationOffset.log.push('Start At: ' + obj.center.x + ', ' + obj.center.y);\r\n
\r\n

});

\r\n

obj.addEventListener('touchmove', function(e){

\r\n
\r\nanimationOffset.log.push(obj.animatedCenter.x + \", \" + obj.animatedCenter.y);\r\nvar newX = e.x + obj.animatedCenter.x - obj.width/2;\r\nvar newY = e.y + obj.animatedCenter.y - obj.height/2;\r\nnewX = newX - animationOffset.x;\r\nnewY = newY - animationOffset.y;\r\n\r\nvar diffX = animationOffset.lastX - newX;\r\nvar diffY = animationOffset.lastY - newY;\r\nif( diffX < 0 ){ diffX = diffX * -1; }\r\nif( diffY < 0 ){ diffY = diffY * -1; }\r\n\r\nif( (newX > animationOffset.screenWidth || newX < 0) || (newY > animationOffset.screenHeight || newY < 0) ){\r\n    obj.fireEvent('touchcancel');\r\n    return;\r\n}\r\n\r\nanimationOffset.lastX = newX;\r\nanimationOffset.lastY = newY;\r\nobj.animate({center:{x:newX,y:newY}, duration:0});\r\n
\r\n

});

\r\n

obj.addEventListener('touchcancel', function(){

\r\n
\r\nobj.animate({center:{x: animationOffset.startingPositionX, y: animationOffset.startingPositionY}, duration:3});\r\n
\r\n

});

\r\n

obj.addEventListener('touchend', function(e){

\r\n
\r\nTi.API.notice('touchend');\r\nfor(var i=0; i<animationOffset.log.length; i++){\r\n    logToTable(animationOffset.log[i]);\r\n}\r\n
\r\n

});

{html}", "attachment": [ { "id": "17995", "filename": "ticket-0-3e93b33ee5eeb1dbcd09f17959e18eea4de4c9d7-jumptest-resources-1.zip", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:53:11.000+0000", "size": 110009, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: iPad, issue with dragging objects after initial release", "creator": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "125739", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Hunh.

{html}", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:53:11.000+0000", "updated": "2011-04-15T02:53:11.000+0000" }, { "id": "199826", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Due to the fact that tableView updating takes a long time. This interferes with the touch event processing. Comment out the logToTable method in `touchend` handler and all works fine", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-06-22T14:57:21.000+0000", "updated": "2012-06-22T14:57:21.000+0000" }, { "id": "411043", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T23:32:55.000+0000", "updated": "2017-03-09T23:32:55.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }