{ "id": "165328", "key": "TIMOB-24317", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": [ { "id": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-10-22T19:06:34.000+0000", "created": "2017-01-17T12:04:44.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "community", "event", "notable", "swipe" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-10-22T19:07:07.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Extend more properties from ScaleGestureDetector to TiView pinch event\r\n\r\n*ref:*\r\nhttps://developer.android.com/reference/android/view/ScaleGestureDetector.html\r\n\r\n*New properties:*\r\n* getCurrentSpan, getCurrentSpanX, getCurrentSpanY\r\n* getEventTime, getTimeDelta\r\n* getFocusX, getFocusY\r\n* getPreviousSpan, getPreviousSpanX, getPreviousSpanY\r\n* isInProgress _always true, maybe bug_\r\n\r\n*Example:*\r\n{code}\r\nvar win = Ti.UI.createWindow(),\r\n pinchView = Ti.UI.createView({\r\n backgroundColor: 'silver'\r\n }),\r\n pointView = Ti.UI.createView({\r\n backgroundColor: 'red',\r\n width: 40,\r\n height: 40,\r\n touchEnabled: false\r\n });\r\n\r\npinchView.add(pointView);\r\nwin.add(pinchView);\r\n\r\npinchView.addEventListener('pinch', function(e) {\r\n _.each(e, function(v, k) {\r\n if (k !== 'source') {\r\n console.log(k, v);\r\n }\r\n });\r\n\r\n pointView.applyProperties({\r\n center: {\r\n x: e.focusX / Ti.Platform.displayCaps.dpi * 160,\r\n y: e.focusY / Ti.Platform.displayCaps.dpi * 160\r\n }\r\n });\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\nTest: touch with 2 fingers, start pinch while you moving your fingers\r\nExpected: the red point keep in the center between your fingers", "attachment": [], "flagged": false, "summary": "Android: Extend Ti.UI.View \"swipe\" gesture properties using ScaleGestureDetector", "creator": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "subtasks": [], "reporter": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "environment": null, "closedSprints": [ { "id": 1088, "state": "closed", "name": "2018 Sprint 22", "startDate": "2018-10-21T23:20:52.653Z", "endDate": "2018-11-04T23:20:00.000Z", "completeDate": "2018-11-04T23:29:59.423Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "404691", "author": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "body": "pr: https://github.com/appcelerator/titanium_mobile/pull/8757", "updateAuthor": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2017-01-17T12:06:02.000+0000", "updated": "2017-01-17T12:06:02.000+0000" }, { "id": "404695", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Can be scheduled for 6.2.0.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-17T13:38:44.000+0000", "updated": "2017-01-17T13:38:44.000+0000" }, { "id": "404735", "author": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "body": "Hope we can put it into 6.1.0?", "updateAuthor": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2017-01-17T19:54:27.000+0000", "updated": "2017-01-17T19:54:27.000+0000" }, { "id": "404736", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Nope, the 6.1.0 release is already full, we need to focus on the open tickets right now.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-17T19:56:14.000+0000", "updated": "2017-01-17T19:56:14.000+0000" }, { "id": "442609", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Using SDK Version {{7.5.0.v20181010051919}} I get the following error when trying to \"touch with 2 fingers, start pinch while you moving your fingers\".\r\n{code:java}\r\n[ERROR] : TiExceptionHandler: (main) [18710,18710] /app.js:16\r\n[ERROR] : TiExceptionHandler: _.each(e, function (v, k) {\r\n[ERROR] : TiExceptionHandler: ^\r\n[ERROR] : TiExceptionHandler: ReferenceError: _ is not defined\r\n[ERROR] : TiExceptionHandler: at View. (/app.js:16:5)\r\n[ERROR] : TiExceptionHandler: at View.value (ti:/events.js:49:21)\r\n[ERROR] : TiExceptionHandler: at View.value (ti:/events.js:101:19)\r\n[ERROR] : TiExceptionHandler:\r\n[ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)\r\n[ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:63)\r\n[ERROR] : TiExceptionHandler: org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:971)\r\n[ERROR] : TiExceptionHandler: org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1196)\r\n[ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:401)\r\n[ERROR] : TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:102)\r\n[ERROR] : TiExceptionHandler: android.os.Looper.loop(Looper.java:193)\r\n[ERROR] : TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:6669)\r\n[ERROR] : TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] : TiExceptionHandler: com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)\r\n[ERROR] : V8Exception: Exception occurred at /app.js:16: Uncaught ReferenceError: _ is not defined\r\n{code}\r\n\r\n*Test Environment*\r\n{code:java}\r\nAPPC Studio: 5.1.0.201808080937\r\nGoogle Pixel xl (Android 9)\r\nAPPC CLI: 7.0.6\r\nOperating System Name: Mac OS Mojave\r\nOperating System Version: 10.14\r\nNode.js Version: 8.9.1\r\nXcode 10.0\r\n{code}", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-15T12:16:01.000+0000", "updated": "2018-10-15T12:16:01.000+0000" }, { "id": "442652", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This works fine on Alloy Applications just not Titanium. ", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-16T13:45:41.000+0000", "updated": "2018-10-16T13:45:41.000+0000" }, { "id": "442838", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "[~smohammed] The sample above won't work in straight Titanium because the `_` variable would need to be defined (it's exposed in Alloy as a global from a packaged library, underscore). That loop would need to be done in straight up JS, something like:\r\n\r\n{code:javascript}\r\nfor (var property in e) {\r\n if (property !== 'source') {\r\n console.log(property, e[property]);\r\n }\r\n}\r\n{code}\r\n\r\nSo anyways, I think if it works in Alloy then you did verify the fix.\r\n", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2018-10-22T19:06:15.000+0000", "updated": "2018-10-22T19:06:15.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }