{ "id": "122027", "key": "TIMOB-15651", "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": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2017-06-26T22:13:54.000+0000", "created": "2013-11-04T17:47:50.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "SupportTeam" ], "versions": [], "issuelinks": [ { "id": "33028", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "122026", "key": "TIMOB-15650", "fields": { "summary": "iOS: x & y positions of \"touchmove\" event are incorrect and erratic", "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" } }, "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": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-08-24T20:55:26.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) 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": "MobileWeb: 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": "427214", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Mobile Web has been deprecated and will be removed in fixVersion 7.0.0.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-08-24T20:55:26.000+0000", "updated": "2017-08-24T20:55:26.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }