{"action":"created","comment":{"url":"https://api.github.com/repos/Workiva/wf-uicomponents/pulls/comments/24539101","id":24539101,"diff_hunk":"@@ -83,6 +83,23 @@ define(function(require) {\n                     inst.trigger(this.name + ev.direction, ev);\n                 }\n             }\n+        },\n+\n+        /**\n+         * This is a custom function, not a standard method on Hammer gestures.\n+         * It will replace the existing swipe gesture Hammer uses with this one.\n+         */\n+        register: function() {\n+            // Install into the detection stack, replacing the default gesture.\n+            var gestures = Hammer.detection.gestures;\n+            for (var i = 0, n = gestures.length; i < n; i++) {\n+                if (gestures[i].name === CustomSwipeGesture.name) {\n+                    gestures.splice(i, 1);\n+                    break;\n+                }\n+            }\n+            Hammer.detection.register(CustomSwipeGesture);","path":"src/awesome_map/CustomSwipeGesture.js","position":19,"original_position":19,"commit_id":"43b79ef63bbf8b36f9ec032e83e04b8f5c75077e","original_commit_id":"43b79ef63bbf8b36f9ec032e83e04b8f5c75077e","user":{"login":"stephenbush-wf","id":7361970,"avatar_url":"https://avatars.githubusercontent.com/u/7361970?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenbush-wf","html_url":"https://github.com/stephenbush-wf","followers_url":"https://api.github.com/users/stephenbush-wf/followers","following_url":"https://api.github.com/users/stephenbush-wf/following{/other_user}","gists_url":"https://api.github.com/users/stephenbush-wf/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenbush-wf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenbush-wf/subscriptions","organizations_url":"https://api.github.com/users/stephenbush-wf/orgs","repos_url":"https://api.github.com/users/stephenbush-wf/repos","events_url":"https://api.github.com/users/stephenbush-wf/events{/privacy}","received_events_url":"https://api.github.com/users/stephenbush-wf/received_events","type":"User","site_admin":false},"body":"could/should ```this``` be used instead of explicitly referring to ```CustomSwipeGesture```?  Or is there some reason to prefer explicit naming","created_at":"2015-02-11T22:14:10Z","updated_at":"2015-02-11T22:14:10Z","html_url":"https://github.com/Workiva/wf-uicomponents/pull/141#discussion_r24539101","pull_request_url":"https://api.github.com/repos/Workiva/wf-uicomponents/pulls/141","_links":{"self":{"href":"https://api.github.com/repos/Workiva/wf-uicomponents/pulls/comments/24539101"},"html":{"href":"https://github.com/Workiva/wf-uicomponents/pull/141#discussion_r24539101"},"pull_request":{"href":"https://api.github.com/repos/Workiva/wf-uicomponents/pulls/141"}}},"pull_request":{"url":"https://api.github.com/repos/Workiva/wf-uicomponents/pulls/141","id":29071628,"html_url":"https://github.com/Workiva/wf-uicomponents/pull/141","diff_url":"https://github.com/Workiva/wf-uicomponents/pull/141.diff","patch_url":"https://github.com/Workiva/wf-uicomponents/pull/141.patch","issue_url":"https://api.github.com/repos/Workiva/wf-uicomponents/issues/141","number":141,"state":"open","locked":false,"title":"HV-271: Fix Hammer Registration of CustomSwipeGesture","user":{"login":"timmccall-wf","id":4155584,"avatar_url":"https://avatars.githubusercontent.com/u/4155584?v=3","gravatar_id":"","url":"https://api.github.com/users/timmccall-wf","html_url":"https://github.com/timmccall-wf","followers_url":"https://api.github.com/users/timmccall-wf/followers","following_url":"https://api.github.com/users/timmccall-wf/following{/other_user}","gists_url":"https://api.github.com/users/timmccall-wf/gists{/gist_id}","starred_url":"https://api.github.com/users/timmccall-wf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timmccall-wf/subscriptions","organizations_url":"https://api.github.com/users/timmccall-wf/orgs","repos_url":"https://api.github.com/users/timmccall-wf/repos","events_url":"https://api.github.com/users/timmccall-wf/events{/privacy}","received_events_url":"https://api.github.com/users/timmccall-wf/received_events","type":"User","site_admin":false},"body":"Problem\r\n-------\r\n\r\nIncorrect registration of CustomSwipeGesture left default Hammer swipe detection in place. The default detection is terrible, as it does not account for instantaneous velocity, instead using the total delta over the total time from touch to release. This can lead to the following breakdowns:\r\n- False positive if you touch, drag far and fast, pause shortly, then release. \r\n- False negative if you touch, drag, pause for a long time, then swipe.\r\n- False negative if you touch, drag, reverse direction, then swipe.\r\n\r\nSolution\r\n--------\r\n\r\nUse the CustomSwipeGesture and register it properly so that consumers don't get the default swipe gesture by accident, which will happen if the consuming app instantiates a Hammer instance before the EventSynthesizer does. :/\r\n\r\nUnit Tests\r\n----------\r\n\r\nAdded\r\n\r\nHow To +10/QA\r\n-------------\r\n\r\nOnce integrated into a consuming application, the swiping behavior will be much better:\r\n- No false positives when dragging fast, pausing, then letting go.\r\n- No false negatives when dragging a small amount, pausing for a long time, then swiping.\r\n- No false negatives when dragging in one direction, then swiping in the reverse direction\r\n\r\n@bryanhales-wf Please integrate into mobile app and verify behavior is good.\r\n@jeroldalbertson-wf Please integrate into HTML viewer and verify behavior is good; will need to emulate a mobile device to get touch event simulation.\r\n\r\nFYI @shanesizer-wf this will resolve the annoying issues you mentioned.","created_at":"2015-02-11T07:04:30Z","updated_at":"2015-02-11T22:14:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"400041d3926502745cc38e2f5a65a55b45b7d1b5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Workiva/wf-uicomponents/pulls/141/commits","review_comments_url":"https://api.github.com/repos/Workiva/wf-uicomponents/pulls/141/comments","review_comment_url":"https://api.github.com/repos/Workiva/wf-uicomponents/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Workiva/wf-uicomponents/issues/141/comments","statuses_url":"https://api.github.com/repos/Workiva/wf-uicomponents/statuses/43b79ef63bbf8b36f9ec032e83e04b8f5c75077e","head":{"label":"Workiva:register_custom_swipe_gesture","ref":"register_custom_swipe_gesture","sha":"43b79ef63bbf8b36f9ec032e83e04b8f5c75077e","user":{"login":"Workiva","id":1087529,"avatar_url":"https://avatars.githubusercontent.com/u/1087529?v=3","gravatar_id":"","url":"https://api.github.com/users/Workiva","html_url":"https://github.com/Workiva","followers_url":"https://api.github.com/users/Workiva/followers","following_url":"https://api.github.com/users/Workiva/following{/other_user}","gists_url":"https://api.github.com/users/Workiva/gists{/gist_id}","starred_url":"https://api.github.com/users/Workiva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Workiva/subscriptions","organizations_url":"https://api.github.com/users/Workiva/orgs","repos_url":"https://api.github.com/users/Workiva/repos","events_url":"https://api.github.com/users/Workiva/events{/privacy}","received_events_url":"https://api.github.com/users/Workiva/received_events","type":"Organization","site_admin":false},"repo":{"id":15975978,"name":"wf-uicomponents","full_name":"Workiva/wf-uicomponents","owner":{"login":"Workiva","id":1087529,"avatar_url":"https://avatars.githubusercontent.com/u/1087529?v=3","gravatar_id":"","url":"https://api.github.com/users/Workiva","html_url":"https://github.com/Workiva","followers_url":"https://api.github.com/users/Workiva/followers","following_url":"https://api.github.com/users/Workiva/following{/other_user}","gists_url":"https://api.github.com/users/Workiva/gists{/gist_id}","starred_url":"https://api.github.com/users/Workiva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Workiva/subscriptions","organizations_url":"https://api.github.com/users/Workiva/orgs","repos_url":"https://api.github.com/users/Workiva/repos","events_url":"https://api.github.com/users/Workiva/events{/privacy}","received_events_url":"https://api.github.com/users/Workiva/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Workiva/wf-uicomponents","description":"","fork":false,"url":"https://api.github.com/repos/Workiva/wf-uicomponents","forks_url":"https://api.github.com/repos/Workiva/wf-uicomponents/forks","keys_url":"https://api.github.com/repos/Workiva/wf-uicomponents/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Workiva/wf-uicomponents/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Workiva/wf-uicomponents/teams","hooks_url":"https://api.github.com/repos/Workiva/wf-uicomponents/hooks","issue_events_url":"https://api.github.com/repos/Workiva/wf-uicomponents/issues/events{/number}","events_url":"https://api.github.com/repos/Workiva/wf-uicomponents/events","assignees_url":"https://api.github.com/repos/Workiva/wf-uicomponents/assignees{/user}","branches_url":"https://api.github.com/repos/Workiva/wf-uicomponents/branches{/branch}","tags_url":"https://api.github.com/repos/Workiva/wf-uicomponents/tags","blobs_url":"https://api.github.com/repos/Workiva/wf-uicomponents/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Workiva/wf-uicomponents/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Workiva/wf-uicomponents/git/refs{/sha}","trees_url":"https://api.github.com/repos/Workiva/wf-uicomponents/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Workiva/wf-uicomponents/statuses/{sha}","languages_url":"https://api.github.com/repos/Workiva/wf-uicomponents/languages","stargazers_url":"https://api.github.com/repos/Workiva/wf-uicomponents/stargazers","contributors_url":"https://api.github.com/repos/Workiva/wf-uicomponents/contributors","subscribers_url":"https://api.github.com/repos/Workiva/wf-uicomponents/subscribers","subscription_url":"https://api.github.com/repos/Workiva/wf-uicomponents/subscription","commits_url":"https://api.github.com/repos/Workiva/wf-uicomponents/commits{/sha}","git_commits_url":"https://api.github.com/repos/Workiva/wf-uicomponents/git/commits{/sha}","comments_url":"https://api.github.com/repos/Workiva/wf-uicomponents/comments{/number}","issue_comment_url":"https://api.github.com/repos/Workiva/wf-uicomponents/issues/comments/{number}","contents_url":"https://api.github.com/repos/Workiva/wf-uicomponents/contents/{+path}","compare_url":"https://api.github.com/repos/Workiva/wf-uicomponents/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Workiva/wf-uicomponents/merges","archive_url":"https://api.github.com/repos/Workiva/wf-uicomponents/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Workiva/wf-uicomponents/downloads","issues_url":"https://api.github.com/repos/Workiva/wf-uicomponents/issues{/number}","pulls_url":"https://api.github.com/repos/Workiva/wf-uicomponents/pulls{/number}","milestones_url":"https://api.github.com/repos/Workiva/wf-uicomponents/milestones{/number}","notifications_url":"https://api.github.com/repos/Workiva/wf-uicomponents/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Workiva/wf-uicomponents/labels{/name}","releases_url":"https://api.github.com/repos/Workiva/wf-uicomponents/releases{/id}","created_at":"2014-01-16T17:54:42Z","updated_at":"2015-02-11T15:54:54Z","pushed_at":"2015-02-11T15:54:54Z","git_url":"git://github.com/Workiva/wf-uicomponents.git","ssh_url":"git@github.com:Workiva/wf-uicomponents.git","clone_url":"https://github.com/Workiva/wf-uicomponents.git","svn_url":"https://github.com/Workiva/wf-uicomponents","homepage":null,"size":2671,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":11,"default_branch":"master"}},"base":{"label":"Workiva:master","ref":"master","sha":"59473be86bae6ffd6359e2b90ba695233365e939","user":{"login":"Workiva","id":1087529,"avatar_url":"https://avatars.githubusercontent.com/u/1087529?v=3","gravatar_id":"","url":"https://api.github.com/users/Workiva","html_url":"https://github.com/Workiva","followers_url":"https://api.github.com/users/Workiva/followers","following_url":"https://api.github.com/users/Workiva/following{/other_user}","gists_url":"https://api.github.com/users/Workiva/gists{/gist_id}","starred_url":"https://api.github.com/users/Workiva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Workiva/subscriptions","organizations_url":"https://api.github.com/users/Workiva/orgs","repos_url":"https://api.github.com/users/Workiva/repos","events_url":"https://api.github.com/users/Workiva/events{/privacy}","received_events_url":"https://api.github.com/users/Workiva/received_events","type":"Organization","site_admin":false},"repo":{"id":15975978,"name":"wf-uicomponents","full_name":"Workiva/wf-uicomponents","owner":{"login":"Workiva","id":1087529,"avatar_url":"https://avatars.githubusercontent.com/u/1087529?v=3","gravatar_id":"","url":"https://api.github.com/users/Workiva","html_url":"https://github.com/Workiva","followers_url":"https://api.github.com/users/Workiva/followers","following_url":"https://api.github.com/users/Workiva/following{/other_user}","gists_url":"https://api.github.com/users/Workiva/gists{/gist_id}","starred_url":"https://api.github.com/users/Workiva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Workiva/subscriptions","organizations_url":"https://api.github.com/users/Workiva/orgs","repos_url":"https://api.github.com/users/Workiva/repos","events_url":"https://api.github.com/users/Workiva/events{/privacy}","received_events_url":"https://api.github.com/users/Workiva/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Workiva/wf-uicomponents","description":"","fork":false,"url":"https://api.github.com/repos/Workiva/wf-uicomponents","forks_url":"https://api.github.com/repos/Workiva/wf-uicomponents/forks","keys_url":"https://api.github.com/repos/Workiva/wf-uicomponents/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Workiva/wf-uicomponents/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Workiva/wf-uicomponents/teams","hooks_url":"https://api.github.com/repos/Workiva/wf-uicomponents/hooks","issue_events_url":"https://api.github.com/repos/Workiva/wf-uicomponents/issues/events{/number}","events_url":"https://api.github.com/repos/Workiva/wf-uicomponents/events","assignees_url":"https://api.github.com/repos/Workiva/wf-uicomponents/assignees{/user}","branches_url":"https://api.github.com/repos/Workiva/wf-uicomponents/branches{/branch}","tags_url":"https://api.github.com/repos/Workiva/wf-uicomponents/tags","blobs_url":"https://api.github.com/repos/Workiva/wf-uicomponents/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Workiva/wf-uicomponents/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Workiva/wf-uicomponents/git/refs{/sha}","trees_url":"https://api.github.com/repos/Workiva/wf-uicomponents/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Workiva/wf-uicomponents/statuses/{sha}","languages_url":"https://api.github.com/repos/Workiva/wf-uicomponents/languages","stargazers_url":"https://api.github.com/repos/Workiva/wf-uicomponents/stargazers","contributors_url":"https://api.github.com/repos/Workiva/wf-uicomponents/contributors","subscribers_url":"https://api.github.com/repos/Workiva/wf-uicomponents/subscribers","subscription_url":"https://api.github.com/repos/Workiva/wf-uicomponents/subscription","commits_url":"https://api.github.com/repos/Workiva/wf-uicomponents/commits{/sha}","git_commits_url":"https://api.github.com/repos/Workiva/wf-uicomponents/git/commits{/sha}","comments_url":"https://api.github.com/repos/Workiva/wf-uicomponents/comments{/number}","issue_comment_url":"https://api.github.com/repos/Workiva/wf-uicomponents/issues/comments/{number}","contents_url":"https://api.github.com/repos/Workiva/wf-uicomponents/contents/{+path}","compare_url":"https://api.github.com/repos/Workiva/wf-uicomponents/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Workiva/wf-uicomponents/merges","archive_url":"https://api.github.com/repos/Workiva/wf-uicomponents/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Workiva/wf-uicomponents/downloads","issues_url":"https://api.github.com/repos/Workiva/wf-uicomponents/issues{/number}","pulls_url":"https://api.github.com/repos/Workiva/wf-uicomponents/pulls{/number}","milestones_url":"https://api.github.com/repos/Workiva/wf-uicomponents/milestones{/number}","notifications_url":"https://api.github.com/repos/Workiva/wf-uicomponents/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Workiva/wf-uicomponents/labels{/name}","releases_url":"https://api.github.com/repos/Workiva/wf-uicomponents/releases{/id}","created_at":"2014-01-16T17:54:42Z","updated_at":"2015-02-11T15:54:54Z","pushed_at":"2015-02-11T15:54:54Z","git_url":"git://github.com/Workiva/wf-uicomponents.git","ssh_url":"git@github.com:Workiva/wf-uicomponents.git","clone_url":"https://github.com/Workiva/wf-uicomponents.git","svn_url":"https://github.com/Workiva/wf-uicomponents","homepage":null,"size":2671,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Workiva/wf-uicomponents/pulls/141"},"html":{"href":"https://github.com/Workiva/wf-uicomponents/pull/141"},"issue":{"href":"https://api.github.com/repos/Workiva/wf-uicomponents/issues/141"},"comments":{"href":"https://api.github.com/repos/Workiva/wf-uicomponents/issues/141/comments"},"review_comments":{"href":"https://api.github.com/repos/Workiva/wf-uicomponents/pulls/141/comments"},"review_comment":{"href":"https://api.github.com/repos/Workiva/wf-uicomponents/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Workiva/wf-uicomponents/pulls/141/commits"},"statuses":{"href":"https://api.github.com/repos/Workiva/wf-uicomponents/statuses/43b79ef63bbf8b36f9ec032e83e04b8f5c75077e"}}}}