GitHub PullRequestReviewCommentEvent at 2014-10-22 02:51:27
Repository: gaia
Actor: weideng
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/19192237","id":19192237,"diff_hunk":"@@ -0,0 +1,100 @@\n+'use strict';\n+\n+/* global HandwritingPadSettings */\n+\n+(function(exports) {\n+\n+var HandwritingPadsManager = function(app) {\n+  this._started = false;\n+  this._timeOutId = undefined;\n+  this._strokeWidth = 5;\n+  this._responseTime = 600;\n+  this._strokePoints = [];\n+\n+  this.isWriting = false;\n+  this.app = app;\n+};\n+\n+HandwritingPadsManager.prototype.start = function() {\n+  if (this._started) {\n+    throw new Error('HandwritingPadsManager: ' +\n+      'Instance should not be start()\\'ed twice.');\n+  }\n+\n+  this.handwritingPadSettings = new HandwritingPadSettings();\n+  this.handwritingPadSettings.promiseManager = this.app.settingsPromiseManager;\n+  this.handwritingPadSettings.initSettings().catch(function rejected() {\n+    console.error('Fatal Error! Failed to get initial ' +\n+      'handwriting pad settings.');\n+  });\n+\n+  this._started = true;\n+};\n+\n+HandwritingPadsManager.prototype.stop = function() {\n+  if (!this._started) {\n+    throw new Error('HandwritingPadsManager: ' +\n+      'Instance was never start()\\'ed but stop() is called.');\n+  }\n+  this.handwritingPadSettings = null;\n+  this._started = false;\n+};\n+\n+HandwritingPadsManager.prototype.handlePressStart = function(press) {\n+  if (this.handwritingPadSettings.initialized) {\n+    var values = this.handwritingPadSettings.getSettingsSync();\n+    this._strokeWidth = values.strokeWidth;\n+    this._responseTime = values.responseTime;\n+  }\n+\n+  clearTimeout(this._timeOutId);\n+  this.isWriting = true;\n+\n+  this.app.layoutRenderingManager.drawHandwritingPad(press,\n+                                                     true,\n+                                                     this._strokeWidth,\n+                                                     function(x, y) {\n+    this._strokePoints.push(x, y);\n+  }.bind(this));\n+};\n+\n+HandwritingPadsManager.prototype.handlePressMove = function(press) {\n+  this.app.layoutRenderingManager.drawHandwritingPad(press,\n+                                                     false,\n+                                                     this._strokeWidth,\n+                                                     function(x, y) {\n+    this._strokePoints.push(x, y);\n+  }.bind(this));\n+};\n+\n+HandwritingPadsManager.prototype.handlePressEnd = function() {\n+  this._timeOutId = setTimeout(this._sendStrokePoints.bind(this),\n+                               1100 - this._responseTime);","path":"apps/keyboard/js/keyboard/handwriting_pads_manager.js","position":72,"original_position":72,"commit_id":"ae36089974ccafd0c83d7fb111a2a422e7205870","original_commit_id":"ae36089974ccafd0c83d7fb111a2a422e7205870","user":{"login":"weideng","id":1265201,"avatar_url":"https://avatars.githubusercontent.com/u/1265201?v=2","gravatar_id":"","url":"https://api.github.com/users/weideng","html_url":"https://github.com/weideng","followers_url":"https://api.github.com/users/weideng/followers","following_url":"https://api.github.com/users/weideng/following{/other_user}","gists_url":"https://api.github.com/users/weideng/gists{/gist_id}","starred_url":"https://api.github.com/users/weideng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weideng/subscriptions","organizations_url":"https://api.github.com/users/weideng/orgs","repos_url":"https://api.github.com/users/weideng/repos","events_url":"https://api.github.com/users/weideng/events{/privacy}","received_events_url":"https://api.github.com/users/weideng/received_events","type":"User","site_admin":false},"body":"I will define a const val MAX_RESPONSE_TIME for the number 1100.\r\nYes, user can set the response time, but we limit the range from 300ms to 800ms now.\r\nIt's from my own user experience. We can discuss it with UX team.","created_at":"2014-10-22T02:51:27Z","updated_at":"2014-10-22T02:51:27Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/25213#discussion_r19192237","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/25213","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/19192237"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/25213#discussion_r19192237"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/25213"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/25213","id":22842098,"html_url":"https://github.com/mozilla-b2g/gaia/pull/25213","diff_url":"https://github.com/mozilla-b2g/gaia/pull/25213.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/25213.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/25213","number":25213,"state":"open","locked":false,"title":"Bug 1020847 - Add handwriting IME for Simplified Chinese.","user":{"login":"weideng","id":1265201,"avatar_url":"https://avatars.githubusercontent.com/u/1265201?v=2","gravatar_id":"","url":"https://api.github.com/users/weideng","html_url":"https://github.com/weideng","followers_url":"https://api.github.com/users/weideng/followers","following_url":"https://api.github.com/users/weideng/following{/other_user}","gists_url":"https://api.github.com/users/weideng/gists{/gist_id}","starred_url":"https://api.github.com/users/weideng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weideng/subscriptions","organizations_url":"https://api.github.com/users/weideng/orgs","repos_url":"https://api.github.com/users/weideng/repos","events_url":"https://api.github.com/users/weideng/events{/privacy}","received_events_url":"https://api.github.com/users/weideng/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-10-16T09:25:51Z","updated_at":"2014-10-22T02:51:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"65e9bd712beb090a77b607cc99afc593ade151aa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/25213/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/25213/comments","review_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/25213/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/ae36089974ccafd0c83d7fb111a2a422e7205870","head":{"label":"weideng:bug1020847","ref":"bug1020847","sha":"ae36089974ccafd0c83d7fb111a2a422e7205870","user":{"login":"weideng","id":1265201,"avatar_url":"https://avatars.githubusercontent.com/u/1265201?v=2","gravatar_id":"","url":"https://api.github.com/users/weideng","html_url":"https://github.com/weideng","followers_url":"https://api.github.com/users/weideng/followers","following_url":"https://api.github.com/users/weideng/following{/other_user}","gists_url":"https://api.github.com/users/weideng/gists{/gist_id}","starred_url":"https://api.github.com/users/weideng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weideng/subscriptions","organizations_url":"https://api.github.com/users/weideng/orgs","repos_url":"https://api.github.com/users/weideng/repos","events_url":"https://api.github.com/users/weideng/events{/privacy}","received_events_url":"https://api.github.com/users/weideng/received_events","type":"User","site_admin":false},"repo":{"id":7141602,"name":"gaia","full_name":"weideng/gaia","owner":{"login":"weideng","id":1265201,"avatar_url":"https://avatars.githubusercontent.com/u/1265201?v=2","gravatar_id":"","url":"https://api.github.com/users/weideng","html_url":"https://github.com/weideng","followers_url":"https://api.github.com/users/weideng/followers","following_url":"https://api.github.com/users/weideng/following{/other_user}","gists_url":"https://api.github.com/users/weideng/gists{/gist_id}","starred_url":"https://api.github.com/users/weideng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weideng/subscriptions","organizations_url":"https://api.github.com/users/weideng/orgs","repos_url":"https://api.github.com/users/weideng/repos","events_url":"https://api.github.com/users/weideng/events{/privacy}","received_events_url":"https://api.github.com/users/weideng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/weideng/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project","fork":true,"url":"https://api.github.com/repos/weideng/gaia","forks_url":"https://api.github.com/repos/weideng/gaia/forks","keys_url":"https://api.github.com/repos/weideng/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weideng/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weideng/gaia/teams","hooks_url":"https://api.github.com/repos/weideng/gaia/hooks","issue_events_url":"https://api.github.com/repos/weideng/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/weideng/gaia/events","assignees_url":"https://api.github.com/repos/weideng/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/weideng/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/weideng/gaia/tags","blobs_url":"https://api.github.com/repos/weideng/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weideng/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weideng/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/weideng/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weideng/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/weideng/gaia/languages","stargazers_url":"https://api.github.com/repos/weideng/gaia/stargazers","contributors_url":"https://api.github.com/repos/weideng/gaia/contributors","subscribers_url":"https://api.github.com/repos/weideng/gaia/subscribers","subscription_url":"https://api.github.com/repos/weideng/gaia/subscription","commits_url":"https://api.github.com/repos/weideng/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/weideng/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/weideng/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/weideng/gaia/issues/comments/{number}","contents_url":"https://api.github.com/repos/weideng/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/weideng/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weideng/gaia/merges","archive_url":"https://api.github.com/repos/weideng/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weideng/gaia/downloads","issues_url":"https://api.github.com/repos/weideng/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/weideng/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/weideng/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/weideng/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weideng/gaia/labels{/name}","releases_url":"https://api.github.com/repos/weideng/gaia/releases{/id}","created_at":"2012-12-13T02:44:17Z","updated_at":"2014-07-14T06:43:20Z","pushed_at":"2014-10-20T10:20:10Z","git_url":"git://github.com/weideng/gaia.git","ssh_url":"git@github.com:weideng/gaia.git","clone_url":"https://github.com/weideng/gaia.git","svn_url":"https://github.com/weideng/gaia","homepage":"https://wiki.mozilla.org/B2G","size":834142,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-b2g:master","ref":"master","sha":"1daf2dadcd0d554c733661a4c0be1b82001e9da0","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=2","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"repo":{"id":2317369,"name":"gaia","full_name":"mozilla-b2g/gaia","owner":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=2","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-b2g/gaia","description":"Bug 1087038. Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":false,"url":"https://api.github.com/repos/mozilla-b2g/gaia","forks_url":"https://api.github.com/repos/mozilla-b2g/gaia/forks","keys_url":"https://api.github.com/repos/mozilla-b2g/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-b2g/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-b2g/gaia/teams","hooks_url":"https://api.github.com/repos/mozilla-b2g/gaia/hooks","issue_events_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-b2g/gaia/events","assignees_url":"https://api.github.com/repos/mozilla-b2g/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-b2g/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/tags","blobs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-b2g/gaia/languages","stargazers_url":"https://api.github.com/repos/mozilla-b2g/gaia/stargazers","contributors_url":"https://api.github.com/repos/mozilla-b2g/gaia/contributors","subscribers_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscribers","subscription_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscription","commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla-b2g/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-b2g/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-b2g/gaia/merges","archive_url":"https://api.github.com/repos/mozilla-b2g/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-b2g/gaia/downloads","issues_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-b2g/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-b2g/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-b2g/gaia/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-b2g/gaia/releases{/id}","created_at":"2011-09-03T01:38:46Z","updated_at":"2014-10-22T00:06:30Z","pushed_at":"2014-10-21T22:57:18Z","git_url":"git://github.com/mozilla-b2g/gaia.git","ssh_url":"git@github.com:mozilla-b2g/gaia.git","clone_url":"https://github.com/mozilla-b2g/gaia.git","svn_url":"https://github.com/mozilla-b2g/gaia","homepage":"https://wiki.mozilla.org/B2G","size":1503411,"stargazers_count":1769,"watchers_count":1769,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1996,"mirror_url":null,"open_issues_count":530,"forks":1996,"open_issues":530,"watchers":1769,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/25213"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/25213"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/25213"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/25213/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/25213/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/25213/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/ae36089974ccafd0c83d7fb111a2a422e7205870"}}}}