{"action":"created","comment":{"url":"https://api.github.com/repos/driftyco/ionic/pulls/comments/22437880","id":22437880,"diff_hunk":"@@ -772,7 +773,21 @@ ionic.views.Scroll = ionic.views.View.inherit({\n         }\n       }\n \n-      self.doTouchMove(getEventTouches(e), e.timeStamp, e.scale);\n+      if(self.options.locking && self.__scrollLockFix.direction === null){\n+        var detect = 5,\n+            dx = Math.abs(e.touches[0].pageX - self.__initialTouchLeft), dy = Math.abs(e.touches[0].pageY - self.__initialTouchTop);\n+        if(dx > detect || dy > detect){\n+          self.__scrollLockFix.direction = dx > dy;\n+          self.__scrollLockFix.doFix = true;\n+        }\n+      }\n+      var dir = self.__scrollLockFix.direction;","path":"js/views/scrollView.js","position":21,"original_position":21,"commit_id":"f51736542874c0c0820e08264fe515f2c24d10fe","original_commit_id":"f51736542874c0c0820e08264fe515f2c24d10fe","user":{"login":"gkalpak","id":8604205,"avatar_url":"https://avatars.githubusercontent.com/u/8604205?v=3","gravatar_id":"","url":"https://api.github.com/users/gkalpak","html_url":"https://github.com/gkalpak","followers_url":"https://api.github.com/users/gkalpak/followers","following_url":"https://api.github.com/users/gkalpak/following{/other_user}","gists_url":"https://api.github.com/users/gkalpak/gists{/gist_id}","starred_url":"https://api.github.com/users/gkalpak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkalpak/subscriptions","organizations_url":"https://api.github.com/users/gkalpak/orgs","repos_url":"https://api.github.com/users/gkalpak/repos","events_url":"https://api.github.com/users/gkalpak/events{/privacy}","received_events_url":"https://api.github.com/users/gkalpak/received_events","type":"User","site_admin":false},"body":"This line could be moved inside the `if` block (since it's not used otherwise).","created_at":"2015-01-04T09:37:21Z","updated_at":"2015-01-04T09:37:21Z","html_url":"https://github.com/driftyco/ionic/pull/2849#discussion_r22437880","pull_request_url":"https://api.github.com/repos/driftyco/ionic/pulls/2849","_links":{"self":{"href":"https://api.github.com/repos/driftyco/ionic/pulls/comments/22437880"},"html":{"href":"https://github.com/driftyco/ionic/pull/2849#discussion_r22437880"},"pull_request":{"href":"https://api.github.com/repos/driftyco/ionic/pulls/2849"}}},"pull_request":{"url":"https://api.github.com/repos/driftyco/ionic/pulls/2849","id":26789536,"html_url":"https://github.com/driftyco/ionic/pull/2849","diff_url":"https://github.com/driftyco/ionic/pull/2849.diff","patch_url":"https://github.com/driftyco/ionic/pull/2849.patch","issue_url":"https://api.github.com/repos/driftyco/ionic/issues/2849","number":2849,"state":"open","locked":false,"title":"Fix Scroll Locking in ion-content/ion-scroll","user":{"login":"derek1906","id":5441361,"avatar_url":"https://avatars.githubusercontent.com/u/5441361?v=3","gravatar_id":"","url":"https://api.github.com/users/derek1906","html_url":"https://github.com/derek1906","followers_url":"https://api.github.com/users/derek1906/followers","following_url":"https://api.github.com/users/derek1906/following{/other_user}","gists_url":"https://api.github.com/users/derek1906/gists{/gist_id}","starred_url":"https://api.github.com/users/derek1906/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derek1906/subscriptions","organizations_url":"https://api.github.com/users/derek1906/orgs","repos_url":"https://api.github.com/users/derek1906/repos","events_url":"https://api.github.com/users/derek1906/events{/privacy}","received_events_url":"https://api.github.com/users/derek1906/received_events","type":"User","site_admin":false},"body":"This is a quick fix for the `locking` property for `ion-content` and `ion-scroll`. In the current version of Ionic, setting `locking` to `true` will not actually lock the scroll direction if dragged with an angle in the beginning.\r\n\r\nA more detailed description of the issue can be found here: http://forum.ionicframework.com/t/ion-content-scroll-locking-doesnt-work/14445\r\n\r\nThis fix is done by modifying the `doTouchMove` invocation to only accept one change in direction at a time, if `locking` is set to `true`. This seems to fix the issue in my tests, however I'm not sure if there's anything else that is affected by this change.","created_at":"2015-01-04T01:58:39Z","updated_at":"2015-01-04T09:37:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e5448ad91e79b172b527ba8543d979c5da3986cd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/driftyco/ionic/pulls/2849/commits","review_comments_url":"https://api.github.com/repos/driftyco/ionic/pulls/2849/comments","review_comment_url":"https://api.github.com/repos/driftyco/ionic/pulls/comments/{number}","comments_url":"https://api.github.com/repos/driftyco/ionic/issues/2849/comments","statuses_url":"https://api.github.com/repos/driftyco/ionic/statuses/f51736542874c0c0820e08264fe515f2c24d10fe","head":{"label":"derek1906:master","ref":"master","sha":"f51736542874c0c0820e08264fe515f2c24d10fe","user":{"login":"derek1906","id":5441361,"avatar_url":"https://avatars.githubusercontent.com/u/5441361?v=3","gravatar_id":"","url":"https://api.github.com/users/derek1906","html_url":"https://github.com/derek1906","followers_url":"https://api.github.com/users/derek1906/followers","following_url":"https://api.github.com/users/derek1906/following{/other_user}","gists_url":"https://api.github.com/users/derek1906/gists{/gist_id}","starred_url":"https://api.github.com/users/derek1906/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derek1906/subscriptions","organizations_url":"https://api.github.com/users/derek1906/orgs","repos_url":"https://api.github.com/users/derek1906/repos","events_url":"https://api.github.com/users/derek1906/events{/privacy}","received_events_url":"https://api.github.com/users/derek1906/received_events","type":"User","site_admin":false},"repo":{"id":28759716,"name":"ionic","full_name":"derek1906/ionic","owner":{"login":"derek1906","id":5441361,"avatar_url":"https://avatars.githubusercontent.com/u/5441361?v=3","gravatar_id":"","url":"https://api.github.com/users/derek1906","html_url":"https://github.com/derek1906","followers_url":"https://api.github.com/users/derek1906/followers","following_url":"https://api.github.com/users/derek1906/following{/other_user}","gists_url":"https://api.github.com/users/derek1906/gists{/gist_id}","starred_url":"https://api.github.com/users/derek1906/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derek1906/subscriptions","organizations_url":"https://api.github.com/users/derek1906/orgs","repos_url":"https://api.github.com/users/derek1906/repos","events_url":"https://api.github.com/users/derek1906/events{/privacy}","received_events_url":"https://api.github.com/users/derek1906/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/derek1906/ionic","description":"Advanced HTML5 mobile development framework and SDK. Build great hybrid apps with web technologies you already know and love. Best friends with AngularJS.","fork":true,"url":"https://api.github.com/repos/derek1906/ionic","forks_url":"https://api.github.com/repos/derek1906/ionic/forks","keys_url":"https://api.github.com/repos/derek1906/ionic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/derek1906/ionic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/derek1906/ionic/teams","hooks_url":"https://api.github.com/repos/derek1906/ionic/hooks","issue_events_url":"https://api.github.com/repos/derek1906/ionic/issues/events{/number}","events_url":"https://api.github.com/repos/derek1906/ionic/events","assignees_url":"https://api.github.com/repos/derek1906/ionic/assignees{/user}","branches_url":"https://api.github.com/repos/derek1906/ionic/branches{/branch}","tags_url":"https://api.github.com/repos/derek1906/ionic/tags","blobs_url":"https://api.github.com/repos/derek1906/ionic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/derek1906/ionic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/derek1906/ionic/git/refs{/sha}","trees_url":"https://api.github.com/repos/derek1906/ionic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/derek1906/ionic/statuses/{sha}","languages_url":"https://api.github.com/repos/derek1906/ionic/languages","stargazers_url":"https://api.github.com/repos/derek1906/ionic/stargazers","contributors_url":"https://api.github.com/repos/derek1906/ionic/contributors","subscribers_url":"https://api.github.com/repos/derek1906/ionic/subscribers","subscription_url":"https://api.github.com/repos/derek1906/ionic/subscription","commits_url":"https://api.github.com/repos/derek1906/ionic/commits{/sha}","git_commits_url":"https://api.github.com/repos/derek1906/ionic/git/commits{/sha}","comments_url":"https://api.github.com/repos/derek1906/ionic/comments{/number}","issue_comment_url":"https://api.github.com/repos/derek1906/ionic/issues/comments/{number}","contents_url":"https://api.github.com/repos/derek1906/ionic/contents/{+path}","compare_url":"https://api.github.com/repos/derek1906/ionic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/derek1906/ionic/merges","archive_url":"https://api.github.com/repos/derek1906/ionic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/derek1906/ionic/downloads","issues_url":"https://api.github.com/repos/derek1906/ionic/issues{/number}","pulls_url":"https://api.github.com/repos/derek1906/ionic/pulls{/number}","milestones_url":"https://api.github.com/repos/derek1906/ionic/milestones{/number}","notifications_url":"https://api.github.com/repos/derek1906/ionic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/derek1906/ionic/labels{/name}","releases_url":"https://api.github.com/repos/derek1906/ionic/releases{/id}","created_at":"2015-01-04T01:25:04Z","updated_at":"2015-01-04T08:23:09Z","pushed_at":"2015-01-04T08:23:08Z","git_url":"git://github.com/derek1906/ionic.git","ssh_url":"git@github.com:derek1906/ionic.git","clone_url":"https://github.com/derek1906/ionic.git","svn_url":"https://github.com/derek1906/ionic","homepage":"http://ionicframework.com/","size":50723,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"driftyco:master","ref":"master","sha":"2f4ebb85cf6cc2b20fa393db3964692749c900fd","user":{"login":"driftyco","id":3171503,"avatar_url":"https://avatars.githubusercontent.com/u/3171503?v=3","gravatar_id":"","url":"https://api.github.com/users/driftyco","html_url":"https://github.com/driftyco","followers_url":"https://api.github.com/users/driftyco/followers","following_url":"https://api.github.com/users/driftyco/following{/other_user}","gists_url":"https://api.github.com/users/driftyco/gists{/gist_id}","starred_url":"https://api.github.com/users/driftyco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/driftyco/subscriptions","organizations_url":"https://api.github.com/users/driftyco/orgs","repos_url":"https://api.github.com/users/driftyco/repos","events_url":"https://api.github.com/users/driftyco/events{/privacy}","received_events_url":"https://api.github.com/users/driftyco/received_events","type":"Organization","site_admin":false},"repo":{"id":12256376,"name":"ionic","full_name":"driftyco/ionic","owner":{"login":"driftyco","id":3171503,"avatar_url":"https://avatars.githubusercontent.com/u/3171503?v=3","gravatar_id":"","url":"https://api.github.com/users/driftyco","html_url":"https://github.com/driftyco","followers_url":"https://api.github.com/users/driftyco/followers","following_url":"https://api.github.com/users/driftyco/following{/other_user}","gists_url":"https://api.github.com/users/driftyco/gists{/gist_id}","starred_url":"https://api.github.com/users/driftyco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/driftyco/subscriptions","organizations_url":"https://api.github.com/users/driftyco/orgs","repos_url":"https://api.github.com/users/driftyco/repos","events_url":"https://api.github.com/users/driftyco/events{/privacy}","received_events_url":"https://api.github.com/users/driftyco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/driftyco/ionic","description":"Advanced HTML5 mobile development framework and SDK. Build great hybrid apps with web technologies you already know and love. Best friends with AngularJS.","fork":false,"url":"https://api.github.com/repos/driftyco/ionic","forks_url":"https://api.github.com/repos/driftyco/ionic/forks","keys_url":"https://api.github.com/repos/driftyco/ionic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/driftyco/ionic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/driftyco/ionic/teams","hooks_url":"https://api.github.com/repos/driftyco/ionic/hooks","issue_events_url":"https://api.github.com/repos/driftyco/ionic/issues/events{/number}","events_url":"https://api.github.com/repos/driftyco/ionic/events","assignees_url":"https://api.github.com/repos/driftyco/ionic/assignees{/user}","branches_url":"https://api.github.com/repos/driftyco/ionic/branches{/branch}","tags_url":"https://api.github.com/repos/driftyco/ionic/tags","blobs_url":"https://api.github.com/repos/driftyco/ionic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/driftyco/ionic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/driftyco/ionic/git/refs{/sha}","trees_url":"https://api.github.com/repos/driftyco/ionic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/driftyco/ionic/statuses/{sha}","languages_url":"https://api.github.com/repos/driftyco/ionic/languages","stargazers_url":"https://api.github.com/repos/driftyco/ionic/stargazers","contributors_url":"https://api.github.com/repos/driftyco/ionic/contributors","subscribers_url":"https://api.github.com/repos/driftyco/ionic/subscribers","subscription_url":"https://api.github.com/repos/driftyco/ionic/subscription","commits_url":"https://api.github.com/repos/driftyco/ionic/commits{/sha}","git_commits_url":"https://api.github.com/repos/driftyco/ionic/git/commits{/sha}","comments_url":"https://api.github.com/repos/driftyco/ionic/comments{/number}","issue_comment_url":"https://api.github.com/repos/driftyco/ionic/issues/comments/{number}","contents_url":"https://api.github.com/repos/driftyco/ionic/contents/{+path}","compare_url":"https://api.github.com/repos/driftyco/ionic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/driftyco/ionic/merges","archive_url":"https://api.github.com/repos/driftyco/ionic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/driftyco/ionic/downloads","issues_url":"https://api.github.com/repos/driftyco/ionic/issues{/number}","pulls_url":"https://api.github.com/repos/driftyco/ionic/pulls{/number}","milestones_url":"https://api.github.com/repos/driftyco/ionic/milestones{/number}","notifications_url":"https://api.github.com/repos/driftyco/ionic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/driftyco/ionic/labels{/name}","releases_url":"https://api.github.com/repos/driftyco/ionic/releases{/id}","created_at":"2013-08-20T23:06:02Z","updated_at":"2015-01-04T08:57:36Z","pushed_at":"2015-01-02T22:36:00Z","git_url":"git://github.com/driftyco/ionic.git","ssh_url":"git@github.com:driftyco/ionic.git","clone_url":"https://github.com/driftyco/ionic.git","svn_url":"https://github.com/driftyco/ionic","homepage":"http://ionicframework.com/","size":50723,"stargazers_count":12599,"watchers_count":12599,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1693,"mirror_url":null,"open_issues_count":382,"forks":1693,"open_issues":382,"watchers":12599,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/driftyco/ionic/pulls/2849"},"html":{"href":"https://github.com/driftyco/ionic/pull/2849"},"issue":{"href":"https://api.github.com/repos/driftyco/ionic/issues/2849"},"comments":{"href":"https://api.github.com/repos/driftyco/ionic/issues/2849/comments"},"review_comments":{"href":"https://api.github.com/repos/driftyco/ionic/pulls/2849/comments"},"review_comment":{"href":"https://api.github.com/repos/driftyco/ionic/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/driftyco/ionic/pulls/2849/commits"},"statuses":{"href":"https://api.github.com/repos/driftyco/ionic/statuses/f51736542874c0c0820e08264fe515f2c24d10fe"}}}}