{ "id": "122026", "key": "TIMOB-15650", "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": null, "resolutiondate": null, "created": "2013-11-04T17:47:27.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "SupportTeam" ], "versions": [], "issuelinks": [ { "id": "33027", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "121953", "key": "TIMOB-15649", "fields": { "summary": "Android: x & y positions of \"touchmove\" event are incorrect and erratic", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "33028", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "122027", "key": "TIMOB-15651", "fields": { "summary": "MobileWeb: x & y positions of \"touchmove\" event are incorrect and erratic", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": null, "updated": "2018-02-28T20:03:27.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h4. Problem Description\r\nA simple draggable view, using the \"touchmove\" event, results in incorrect or erratic values in the event object x and y positions. When setting the view to the new position, based of the finger movement, it will appear to \"jump\" as the values are not sequential in nature. For example, dragging and item to the right might return x values of 1, 2, 5, 4, 6, 7, 9, 8, 11, 10, etc. C\r\n\r\nh4. Steps to reproduce\r\n1. Create a new mobile project\r\n2. Paste this code into app.js:\r\n{code}\r\nvar index = Ti.UI.createWindow({backgroundColor:'black'});\r\nvar view = Ti.UI.createView({backgroundColor:'white'});\r\nindex.add(view);\r\n\r\nindex.addEventListener('postlayout', onWindowReady);\r\n\r\nvar baseHeight; //Original Height of View\r\nvar baseWidth;// Original Width of View\r\n\r\nvar startX; //1st touch x\r\nvar startY; //1st touch y\r\nvar lastX; //last touch x\r\nvar lastY; //last touch y\r\nvar imageX; //x position of view at start\r\nvar imageY; //y position of view at start\r\n\r\nfunction onViewPinch(e) {\r\n view.height = baseHeight * e.scale;\r\n view.width = baseWidth * e.scale;\r\n}\r\n\r\nfunction onViewTouchStart(e) {\r\n\r\n\tbaseHeight = view.height;\r\n\tbaseWidth = view.width;\r\n\r\n\tvar rect = view.rect;\r\n\timageX = rect.x;\r\n\timageY = rect.y;\r\n\t\r\n\tlastX = startX = e.x;\r\n\tlastY = startY = e.y;\r\n\r\n\tTi.API.log(\"onImageTouchStart => \" + startX + \", \" + startY);\r\n}\r\n\r\nfunction onViewTouchMove(e) {\r\n\tTi.API.log(\"onImageMove Delta Last=> \" + (e.x - lastX) + \", \" + (e.y - lastY));\r\n\tTi.API.log(\"onImageMove E Values => \" + (e.x) + \", \" + (e.y));\r\n\t\r\n\tlastX = e.x;\r\n\tlastY = e.y;\r\n\tvar deltaX = e.x - startX;\r\n\tvar deltaY = e.y - startY;\r\n view.left = imageX + deltaX;\r\n view.top = imageY + deltaY;\r\n}\r\n\r\nfunction onViewTouchEnd(e) {\r\n\tTi.API.log(\"onViewTouchEnd Delta Last=> \" + (e.x - lastX) + \", \" + (e.y - lastY));\r\n\tTi.API.log(\"onViewTouchEnd E Values => \" + (e.x) + \", \" + (e.y));\r\n\tvar deltaX = e.x - startX;\r\n\tvar deltaY = e.y - startY;\r\n view.left = imageX + deltaX;\r\n view.top = imageY + deltaY;\r\n}\r\n\r\nfunction onWindowReady(e) {\r\n\tTi.API.log(\"onWindowReady\");\r\n\tindex.removeEventListener('postlayout', onWindowReady);\r\n\tview.addEventListener('pinch', onViewPinch);\r\n\tview.addEventListener('touchstart', onViewTouchStart);\r\n\tview.addEventListener('touchmove', onViewTouchMove);\r\n\tview.addEventListener('touchend', onViewTouchEnd);\r\n}\r\n\r\nindex.open();\r\n{code}\r\n3. Run into device\r\n4. Go with your finger moving to the upper left corner or the device, or down to the right lower corner. \r\n5. You will see the jumping black square, even if that should happen softly. \r\n\r\n\r\n\r\n ", "attachment": [], "flagged": false, "summary": "iOS: x & y positions of \"touchmove\" event are incorrect and erratic", "creator": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Ti 3.1_X, including 3.1.4\r\nTested Android 4.3 with Nexus 4, Samsung Galaxy S3 and Samsung Note 10.1\r\nTested iOS7, iphone5s.", "comment": { "comments": [ { "id": "324658", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue exist with 3.1.4 but can't reproduce on 3.4.0 \r\nAppcelerator Studio, build: 3.3.0.201407111535 \r\nTiSDK 3.4.0 \r\niOS : 7.0 \r\nTitanium Command-Line Interface, CLI version 3.3.0", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-19T06:08:25.000+0000", "updated": "2014-09-19T06:08:25.000+0000" }, { "id": "325193", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and reopened. The issue is still reproducible with\r\nMac osx 10.9.5 Mavericks\r\nAppcelerator Studio, build: 3.4.0.201409161950\r\nTitanium SDK, build: 3.4.0.v20140922135716\r\nacs@1.0.16\r\nalloy 1.5.0-rc2\r\ninstall@0.1.7\r\nnpm@1.4.23\r\nsudo@1.0.3\r\ntitanium 3.4.0-rc4\r\ntitanium-code-processor@1.1.1\r\nXcode6.0.1 (6A317)\r\nDevices:\r\niPhone 6 iOS 8 \r\niPhone 6+ iOS 8\r\niPhone5 iOS 8", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-23T17:35:35.000+0000", "updated": "2014-09-23T17:35:35.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }