{"action":"created","comment":{"url":"https://api.github.com/repos/pixijs/pixi.js/pulls/comments/91205016","pull_request_review_id":11712906,"id":91205016,"diff_hunk":"@@ -864,286 +804,184 @@ export default class InteractionManager extends EventEmitter\n \n             if (displayObject.interactive)\n             {\n-                if (hit && !this.eventData.target)\n+                if (hit && !interactionEvent.target)\n                 {\n-                    this.eventData.target = displayObject;\n-                    this.mouse.target = displayObject;\n-                    this.pointer.target = displayObject;\n+                    interactionEvent.target = displayObject;\n                 }\n \n-                func(displayObject, hit);\n+                func(interactionEvent, displayObject, hit);\n             }\n         }\n \n         return hit;\n     }\n \n     /**\n-     * Is called when the mouse button is pressed down on the renderer element\n+     * Is called when the pointer button is pressed down on the renderer element\n      *\n      * @private\n-     * @param {MouseEvent} event - The DOM event of a mouse button being pressed down\n+     * @param {PointerEvent} originalEvent - The DOM event of a pointer button being pressed down\n      */\n-    onMouseDown(event)\n+    onPointerDown(originalEvent)\n     {\n-        this.mouse.originalEvent = event;\n-        this.eventData.data = this.mouse;\n-        this.eventData._reset();\n+        const events = this.normalizeToPointerData(originalEvent);\n+\n+        /**\n+         * No need to prevent default on natural pointer events, as there are no side effects\n+         * Normalized events, however, may have the double mousedown/touchstart issue on the native android browser,\n+         * so still need to be prevented.\n+         */\n \n-        // Update internal mouse reference\n-        this.mapPositionToPoint(this.mouse.global, event.clientX, event.clientY);\n+        // Guaranteed that there will be at least one event in events, and all events must have the same pointer type\n \n-        if (this.autoPreventDefault)\n+        if (this.autoPreventDefault && (events[0].pointerType === 'touch' || events[0].pointerType === 'mouse'))\n         {\n-            this.mouse.originalEvent.preventDefault();\n+            originalEvent.preventDefault();\n         }\n \n-        this.processInteractive(this.mouse.global, this.renderer._lastObjectRendered, this.processMouseDown, true);\n+        const eventLen = events.length;\n \n-        const isRightButton = event.button === 2 || event.which === 3;\n-\n-        this.emit(isRightButton ? 'rightdown' : 'mousedown', this.eventData);\n-    }\n-\n-    /**\n-     * Processes the result of the mouse down check and dispatches the event if need be\n-     *\n-     * @private\n-     * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - The display object that was tested\n-     * @param {boolean} hit - the result of the hit test on the display object\n-     */\n-    processMouseDown(displayObject, hit)\n-    {\n-        const e = this.mouse.originalEvent;\n-\n-        const isRightButton = e.button === 2 || e.which === 3;\n-\n-        if (hit)\n+        for (let i = 0; i < eventLen; i++)\n         {\n-            displayObject[isRightButton ? '_isRightDown' : '_isLeftDown'] = true;\n-            this.dispatchEvent(displayObject, isRightButton ? 'rightdown' : 'mousedown', this.eventData);\n-        }\n-    }\n+            const event = events[i];\n \n-    /**\n-     * Is called when the mouse button is released on the renderer element\n-     *\n-     * @private\n-     * @param {MouseEvent} event - The DOM event of a mouse button being released\n-     */\n-    onMouseUp(event)\n-    {\n-        this.mouse.originalEvent = event;\n-        this.eventData.data = this.mouse;\n-        this.eventData._reset();\n+            const interactionData = this.getIteractionDataForPointerId(event.pointerId);","path":"src/interaction/InteractionManager.js","position":452,"original_position":452,"commit_id":"f61431a6aa80f4ca19f66a770bd65f6c578f3486","original_commit_id":"f61431a6aa80f4ca19f66a770bd65f6c578f3486","user":{"login":"andrewstart","id":1816311,"avatar_url":"https://avatars.githubusercontent.com/u/1816311?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewstart","html_url":"https://github.com/andrewstart","followers_url":"https://api.github.com/users/andrewstart/followers","following_url":"https://api.github.com/users/andrewstart/following{/other_user}","gists_url":"https://api.github.com/users/andrewstart/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewstart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewstart/subscriptions","organizations_url":"https://api.github.com/users/andrewstart/orgs","repos_url":"https://api.github.com/users/andrewstart/repos","events_url":"https://api.github.com/users/andrewstart/events{/privacy}","received_events_url":"https://api.github.com/users/andrewstart/received_events","type":"User","site_admin":false},"body":"Should this be `getInteractionDataForPointerId` (note the n in Interaction)? This typo appears to be in a few places.","created_at":"2016-12-07T00:37:53Z","updated_at":"2016-12-07T01:02:29Z","html_url":"https://github.com/pixijs/pixi.js/pull/3375#discussion_r91205016","pull_request_url":"https://api.github.com/repos/pixijs/pixi.js/pulls/3375","_links":{"self":{"href":"https://api.github.com/repos/pixijs/pixi.js/pulls/comments/91205016"},"html":{"href":"https://github.com/pixijs/pixi.js/pull/3375#discussion_r91205016"},"pull_request":{"href":"https://api.github.com/repos/pixijs/pixi.js/pulls/3375"}}},"pull_request":{"url":"https://api.github.com/repos/pixijs/pixi.js/pulls/3375","id":95745504,"html_url":"https://github.com/pixijs/pixi.js/pull/3375","diff_url":"https://github.com/pixijs/pixi.js/pull/3375.diff","patch_url":"https://github.com/pixijs/pixi.js/pull/3375.patch","issue_url":"https://api.github.com/repos/pixijs/pixi.js/issues/3375","number":3375,"state":"open","locked":false,"title":"See #3149 --- Add support for touchcancel and pointercancel","user":{"login":"starakaj","id":523270,"avatar_url":"https://avatars.githubusercontent.com/u/523270?v=3","gravatar_id":"","url":"https://api.github.com/users/starakaj","html_url":"https://github.com/starakaj","followers_url":"https://api.github.com/users/starakaj/followers","following_url":"https://api.github.com/users/starakaj/following{/other_user}","gists_url":"https://api.github.com/users/starakaj/gists{/gist_id}","starred_url":"https://api.github.com/users/starakaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starakaj/subscriptions","organizations_url":"https://api.github.com/users/starakaj/orgs","repos_url":"https://api.github.com/users/starakaj/repos","events_url":"https://api.github.com/users/starakaj/events{/privacy}","received_events_url":"https://api.github.com/users/starakaj/received_events","type":"User","site_admin":false},"body":"Doesn't fix all of the concerns in #3149, but does add touchcancel and pointercancel events","created_at":"2016-11-29T18:10:03Z","updated_at":"2016-12-07T01:02:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c7697a6ee649de19f406be5615dd7ce07dde266a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pixijs/pixi.js/pulls/3375/commits","review_comments_url":"https://api.github.com/repos/pixijs/pixi.js/pulls/3375/comments","review_comment_url":"https://api.github.com/repos/pixijs/pixi.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pixijs/pixi.js/issues/3375/comments","statuses_url":"https://api.github.com/repos/pixijs/pixi.js/statuses/f61431a6aa80f4ca19f66a770bd65f6c578f3486","head":{"label":"starakaj:dev","ref":"dev","sha":"f61431a6aa80f4ca19f66a770bd65f6c578f3486","user":{"login":"starakaj","id":523270,"avatar_url":"https://avatars.githubusercontent.com/u/523270?v=3","gravatar_id":"","url":"https://api.github.com/users/starakaj","html_url":"https://github.com/starakaj","followers_url":"https://api.github.com/users/starakaj/followers","following_url":"https://api.github.com/users/starakaj/following{/other_user}","gists_url":"https://api.github.com/users/starakaj/gists{/gist_id}","starred_url":"https://api.github.com/users/starakaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starakaj/subscriptions","organizations_url":"https://api.github.com/users/starakaj/orgs","repos_url":"https://api.github.com/users/starakaj/repos","events_url":"https://api.github.com/users/starakaj/events{/privacy}","received_events_url":"https://api.github.com/users/starakaj/received_events","type":"User","site_admin":false},"repo":{"id":71917270,"name":"pixi.js","full_name":"starakaj/pixi.js","owner":{"login":"starakaj","id":523270,"avatar_url":"https://avatars.githubusercontent.com/u/523270?v=3","gravatar_id":"","url":"https://api.github.com/users/starakaj","html_url":"https://github.com/starakaj","followers_url":"https://api.github.com/users/starakaj/followers","following_url":"https://api.github.com/users/starakaj/following{/other_user}","gists_url":"https://api.github.com/users/starakaj/gists{/gist_id}","starred_url":"https://api.github.com/users/starakaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starakaj/subscriptions","organizations_url":"https://api.github.com/users/starakaj/orgs","repos_url":"https://api.github.com/users/starakaj/repos","events_url":"https://api.github.com/users/starakaj/events{/privacy}","received_events_url":"https://api.github.com/users/starakaj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/starakaj/pixi.js","description":"Super fast HTML 5 2D rendering engine that uses webGL with canvas fallback","fork":true,"url":"https://api.github.com/repos/starakaj/pixi.js","forks_url":"https://api.github.com/repos/starakaj/pixi.js/forks","keys_url":"https://api.github.com/repos/starakaj/pixi.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/starakaj/pixi.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/starakaj/pixi.js/teams","hooks_url":"https://api.github.com/repos/starakaj/pixi.js/hooks","issue_events_url":"https://api.github.com/repos/starakaj/pixi.js/issues/events{/number}","events_url":"https://api.github.com/repos/starakaj/pixi.js/events","assignees_url":"https://api.github.com/repos/starakaj/pixi.js/assignees{/user}","branches_url":"https://api.github.com/repos/starakaj/pixi.js/branches{/branch}","tags_url":"https://api.github.com/repos/starakaj/pixi.js/tags","blobs_url":"https://api.github.com/repos/starakaj/pixi.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/starakaj/pixi.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/starakaj/pixi.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/starakaj/pixi.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/starakaj/pixi.js/statuses/{sha}","languages_url":"https://api.github.com/repos/starakaj/pixi.js/languages","stargazers_url":"https://api.github.com/repos/starakaj/pixi.js/stargazers","contributors_url":"https://api.github.com/repos/starakaj/pixi.js/contributors","subscribers_url":"https://api.github.com/repos/starakaj/pixi.js/subscribers","subscription_url":"https://api.github.com/repos/starakaj/pixi.js/subscription","commits_url":"https://api.github.com/repos/starakaj/pixi.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/starakaj/pixi.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/starakaj/pixi.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/starakaj/pixi.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/starakaj/pixi.js/contents/{+path}","compare_url":"https://api.github.com/repos/starakaj/pixi.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/starakaj/pixi.js/merges","archive_url":"https://api.github.com/repos/starakaj/pixi.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/starakaj/pixi.js/downloads","issues_url":"https://api.github.com/repos/starakaj/pixi.js/issues{/number}","pulls_url":"https://api.github.com/repos/starakaj/pixi.js/pulls{/number}","milestones_url":"https://api.github.com/repos/starakaj/pixi.js/milestones{/number}","notifications_url":"https://api.github.com/repos/starakaj/pixi.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/starakaj/pixi.js/labels{/name}","releases_url":"https://api.github.com/repos/starakaj/pixi.js/releases{/id}","deployments_url":"https://api.github.com/repos/starakaj/pixi.js/deployments","created_at":"2016-10-25T16:33:39Z","updated_at":"2016-10-25T16:33:41Z","pushed_at":"2016-12-06T00:40:58Z","git_url":"git://github.com/starakaj/pixi.js.git","ssh_url":"git@github.com:starakaj/pixi.js.git","clone_url":"https://github.com/starakaj/pixi.js.git","svn_url":"https://github.com/starakaj/pixi.js","homepage":null,"size":63329,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pixijs:dev","ref":"dev","sha":"955596b9a0f08bd06e4d54c639bc0ee7e79e04da","user":{"login":"pixijs","id":5406849,"avatar_url":"https://avatars.githubusercontent.com/u/5406849?v=3","gravatar_id":"","url":"https://api.github.com/users/pixijs","html_url":"https://github.com/pixijs","followers_url":"https://api.github.com/users/pixijs/followers","following_url":"https://api.github.com/users/pixijs/following{/other_user}","gists_url":"https://api.github.com/users/pixijs/gists{/gist_id}","starred_url":"https://api.github.com/users/pixijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixijs/subscriptions","organizations_url":"https://api.github.com/users/pixijs/orgs","repos_url":"https://api.github.com/users/pixijs/repos","events_url":"https://api.github.com/users/pixijs/events{/privacy}","received_events_url":"https://api.github.com/users/pixijs/received_events","type":"Organization","site_admin":false},"repo":{"id":7741856,"name":"pixi.js","full_name":"pixijs/pixi.js","owner":{"login":"pixijs","id":5406849,"avatar_url":"https://avatars.githubusercontent.com/u/5406849?v=3","gravatar_id":"","url":"https://api.github.com/users/pixijs","html_url":"https://github.com/pixijs","followers_url":"https://api.github.com/users/pixijs/followers","following_url":"https://api.github.com/users/pixijs/following{/other_user}","gists_url":"https://api.github.com/users/pixijs/gists{/gist_id}","starred_url":"https://api.github.com/users/pixijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixijs/subscriptions","organizations_url":"https://api.github.com/users/pixijs/orgs","repos_url":"https://api.github.com/users/pixijs/repos","events_url":"https://api.github.com/users/pixijs/events{/privacy}","received_events_url":"https://api.github.com/users/pixijs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pixijs/pixi.js","description":"Super fast HTML 5 2D rendering engine that uses webGL with canvas fallback","fork":false,"url":"https://api.github.com/repos/pixijs/pixi.js","forks_url":"https://api.github.com/repos/pixijs/pixi.js/forks","keys_url":"https://api.github.com/repos/pixijs/pixi.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pixijs/pixi.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pixijs/pixi.js/teams","hooks_url":"https://api.github.com/repos/pixijs/pixi.js/hooks","issue_events_url":"https://api.github.com/repos/pixijs/pixi.js/issues/events{/number}","events_url":"https://api.github.com/repos/pixijs/pixi.js/events","assignees_url":"https://api.github.com/repos/pixijs/pixi.js/assignees{/user}","branches_url":"https://api.github.com/repos/pixijs/pixi.js/branches{/branch}","tags_url":"https://api.github.com/repos/pixijs/pixi.js/tags","blobs_url":"https://api.github.com/repos/pixijs/pixi.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pixijs/pixi.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pixijs/pixi.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/pixijs/pixi.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pixijs/pixi.js/statuses/{sha}","languages_url":"https://api.github.com/repos/pixijs/pixi.js/languages","stargazers_url":"https://api.github.com/repos/pixijs/pixi.js/stargazers","contributors_url":"https://api.github.com/repos/pixijs/pixi.js/contributors","subscribers_url":"https://api.github.com/repos/pixijs/pixi.js/subscribers","subscription_url":"https://api.github.com/repos/pixijs/pixi.js/subscription","commits_url":"https://api.github.com/repos/pixijs/pixi.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/pixijs/pixi.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/pixijs/pixi.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/pixijs/pixi.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/pixijs/pixi.js/contents/{+path}","compare_url":"https://api.github.com/repos/pixijs/pixi.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pixijs/pixi.js/merges","archive_url":"https://api.github.com/repos/pixijs/pixi.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pixijs/pixi.js/downloads","issues_url":"https://api.github.com/repos/pixijs/pixi.js/issues{/number}","pulls_url":"https://api.github.com/repos/pixijs/pixi.js/pulls{/number}","milestones_url":"https://api.github.com/repos/pixijs/pixi.js/milestones{/number}","notifications_url":"https://api.github.com/repos/pixijs/pixi.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pixijs/pixi.js/labels{/name}","releases_url":"https://api.github.com/repos/pixijs/pixi.js/releases{/id}","deployments_url":"https://api.github.com/repos/pixijs/pixi.js/deployments","created_at":"2013-01-21T22:40:50Z","updated_at":"2016-12-07T00:47:19Z","pushed_at":"2016-12-06T15:51:18Z","git_url":"git://github.com/pixijs/pixi.js.git","ssh_url":"git@github.com:pixijs/pixi.js.git","clone_url":"https://github.com/pixijs/pixi.js.git","svn_url":"https://github.com/pixijs/pixi.js","homepage":null,"size":90465,"stargazers_count":12305,"watchers_count":12305,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2299,"mirror_url":null,"open_issues_count":220,"forks":2299,"open_issues":220,"watchers":12305,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/pixijs/pixi.js/pulls/3375"},"html":{"href":"https://github.com/pixijs/pixi.js/pull/3375"},"issue":{"href":"https://api.github.com/repos/pixijs/pixi.js/issues/3375"},"comments":{"href":"https://api.github.com/repos/pixijs/pixi.js/issues/3375/comments"},"review_comments":{"href":"https://api.github.com/repos/pixijs/pixi.js/pulls/3375/comments"},"review_comment":{"href":"https://api.github.com/repos/pixijs/pixi.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pixijs/pixi.js/pulls/3375/commits"},"statuses":{"href":"https://api.github.com/repos/pixijs/pixi.js/statuses/f61431a6aa80f4ca19f66a770bd65f6c578f3486"}}}}
{"actor":{"display_login":"andrewstart"}}