{"action":"opened","number":198,"pull_request":{"url":"https://api.github.com/repos/szimek/signature_pad/pulls/198","id":95500748,"html_url":"https://github.com/szimek/signature_pad/pull/198","diff_url":"https://github.com/szimek/signature_pad/pull/198.diff","patch_url":"https://github.com/szimek/signature_pad/pull/198.patch","issue_url":"https://api.github.com/repos/szimek/signature_pad/issues/198","number":198,"state":"open","locked":false,"title":"Stephanbrunker patch 1","user":{"login":"stephanbrunker","id":18150071,"avatar_url":"https://avatars.githubusercontent.com/u/18150071?v=3","gravatar_id":"","url":"https://api.github.com/users/stephanbrunker","html_url":"https://github.com/stephanbrunker","followers_url":"https://api.github.com/users/stephanbrunker/followers","following_url":"https://api.github.com/users/stephanbrunker/following{/other_user}","gists_url":"https://api.github.com/users/stephanbrunker/gists{/gist_id}","starred_url":"https://api.github.com/users/stephanbrunker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephanbrunker/subscriptions","organizations_url":"https://api.github.com/users/stephanbrunker/orgs","repos_url":"https://api.github.com/users/stephanbrunker/repos","events_url":"https://api.github.com/users/stephanbrunker/events{/privacy}","received_events_url":"https://api.github.com/users/stephanbrunker/received_events","type":"User","site_admin":false},"body":"In this completely revised version of the signature-pad for Javascript I did these changes:\r\nFirst, I sorted and commented the different functions for better insight. \r\nThen I rewrote most of drawing logic. The original version didn't like dots, so I sorted it out following the cleanest way to do it. In Javascript, the DOWN event has the same coordinates as the first MOVE, and the last MOVE has the same as the UP event, even if there is only a single click, an MOVE event is fired. So, i add points at MOVE events, and at the UP event i decide: If the points array has four members, a bezier curve is drawn until the 3rd point, so I double the last point to draw it to the last position. Three members aren't possible, because then the first point would be doubled to start the bezier. With two members, you can only draw a single line, so I added a function for this and with only one point you need a dot - I added this also. I also consolidated some of the functions to make it cleaner.","created_at":"2016-11-28T13:43:52Z","updated_at":"2016-11-28T13:43:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/szimek/signature_pad/pulls/198/commits","review_comments_url":"https://api.github.com/repos/szimek/signature_pad/pulls/198/comments","review_comment_url":"https://api.github.com/repos/szimek/signature_pad/pulls/comments{/number}","comments_url":"https://api.github.com/repos/szimek/signature_pad/issues/198/comments","statuses_url":"https://api.github.com/repos/szimek/signature_pad/statuses/2e3a453226cade02fa510094cb981c4682128fc9","head":{"label":"stephanbrunker:stephanbrunker-patch-1","ref":"stephanbrunker-patch-1","sha":"2e3a453226cade02fa510094cb981c4682128fc9","user":{"login":"stephanbrunker","id":18150071,"avatar_url":"https://avatars.githubusercontent.com/u/18150071?v=3","gravatar_id":"","url":"https://api.github.com/users/stephanbrunker","html_url":"https://github.com/stephanbrunker","followers_url":"https://api.github.com/users/stephanbrunker/followers","following_url":"https://api.github.com/users/stephanbrunker/following{/other_user}","gists_url":"https://api.github.com/users/stephanbrunker/gists{/gist_id}","starred_url":"https://api.github.com/users/stephanbrunker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephanbrunker/subscriptions","organizations_url":"https://api.github.com/users/stephanbrunker/orgs","repos_url":"https://api.github.com/users/stephanbrunker/repos","events_url":"https://api.github.com/users/stephanbrunker/events{/privacy}","received_events_url":"https://api.github.com/users/stephanbrunker/received_events","type":"User","site_admin":false},"repo":{"id":74971166,"name":"signature_pad","full_name":"stephanbrunker/signature_pad","owner":{"login":"stephanbrunker","id":18150071,"avatar_url":"https://avatars.githubusercontent.com/u/18150071?v=3","gravatar_id":"","url":"https://api.github.com/users/stephanbrunker","html_url":"https://github.com/stephanbrunker","followers_url":"https://api.github.com/users/stephanbrunker/followers","following_url":"https://api.github.com/users/stephanbrunker/following{/other_user}","gists_url":"https://api.github.com/users/stephanbrunker/gists{/gist_id}","starred_url":"https://api.github.com/users/stephanbrunker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephanbrunker/subscriptions","organizations_url":"https://api.github.com/users/stephanbrunker/orgs","repos_url":"https://api.github.com/users/stephanbrunker/repos","events_url":"https://api.github.com/users/stephanbrunker/events{/privacy}","received_events_url":"https://api.github.com/users/stephanbrunker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stephanbrunker/signature_pad","description":"HTML5 canvas based smooth signature drawing","fork":true,"url":"https://api.github.com/repos/stephanbrunker/signature_pad","forks_url":"https://api.github.com/repos/stephanbrunker/signature_pad/forks","keys_url":"https://api.github.com/repos/stephanbrunker/signature_pad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stephanbrunker/signature_pad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stephanbrunker/signature_pad/teams","hooks_url":"https://api.github.com/repos/stephanbrunker/signature_pad/hooks","issue_events_url":"https://api.github.com/repos/stephanbrunker/signature_pad/issues/events{/number}","events_url":"https://api.github.com/repos/stephanbrunker/signature_pad/events","assignees_url":"https://api.github.com/repos/stephanbrunker/signature_pad/assignees{/user}","branches_url":"https://api.github.com/repos/stephanbrunker/signature_pad/branches{/branch}","tags_url":"https://api.github.com/repos/stephanbrunker/signature_pad/tags","blobs_url":"https://api.github.com/repos/stephanbrunker/signature_pad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stephanbrunker/signature_pad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stephanbrunker/signature_pad/git/refs{/sha}","trees_url":"https://api.github.com/repos/stephanbrunker/signature_pad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stephanbrunker/signature_pad/statuses/{sha}","languages_url":"https://api.github.com/repos/stephanbrunker/signature_pad/languages","stargazers_url":"https://api.github.com/repos/stephanbrunker/signature_pad/stargazers","contributors_url":"https://api.github.com/repos/stephanbrunker/signature_pad/contributors","subscribers_url":"https://api.github.com/repos/stephanbrunker/signature_pad/subscribers","subscription_url":"https://api.github.com/repos/stephanbrunker/signature_pad/subscription","commits_url":"https://api.github.com/repos/stephanbrunker/signature_pad/commits{/sha}","git_commits_url":"https://api.github.com/repos/stephanbrunker/signature_pad/git/commits{/sha}","comments_url":"https://api.github.com/repos/stephanbrunker/signature_pad/comments{/number}","issue_comment_url":"https://api.github.com/repos/stephanbrunker/signature_pad/issues/comments{/number}","contents_url":"https://api.github.com/repos/stephanbrunker/signature_pad/contents/{+path}","compare_url":"https://api.github.com/repos/stephanbrunker/signature_pad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stephanbrunker/signature_pad/merges","archive_url":"https://api.github.com/repos/stephanbrunker/signature_pad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stephanbrunker/signature_pad/downloads","issues_url":"https://api.github.com/repos/stephanbrunker/signature_pad/issues{/number}","pulls_url":"https://api.github.com/repos/stephanbrunker/signature_pad/pulls{/number}","milestones_url":"https://api.github.com/repos/stephanbrunker/signature_pad/milestones{/number}","notifications_url":"https://api.github.com/repos/stephanbrunker/signature_pad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stephanbrunker/signature_pad/labels{/name}","releases_url":"https://api.github.com/repos/stephanbrunker/signature_pad/releases{/id}","deployments_url":"https://api.github.com/repos/stephanbrunker/signature_pad/deployments","created_at":"2016-11-28T12:32:12Z","updated_at":"2016-11-28T12:32:13Z","pushed_at":"2016-11-28T13:41:52Z","git_url":"git://github.com/stephanbrunker/signature_pad.git","ssh_url":"git@github.com:stephanbrunker/signature_pad.git","clone_url":"https://github.com/stephanbrunker/signature_pad.git","svn_url":"https://github.com/stephanbrunker/signature_pad","homepage":"http://szimek.github.io/signature_pad/","size":298,"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":"szimek:master","ref":"master","sha":"47fdc1a861d010250e2d833de301c3c2c3187693","user":{"login":"szimek","id":9873,"avatar_url":"https://avatars.githubusercontent.com/u/9873?v=3","gravatar_id":"","url":"https://api.github.com/users/szimek","html_url":"https://github.com/szimek","followers_url":"https://api.github.com/users/szimek/followers","following_url":"https://api.github.com/users/szimek/following{/other_user}","gists_url":"https://api.github.com/users/szimek/gists{/gist_id}","starred_url":"https://api.github.com/users/szimek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szimek/subscriptions","organizations_url":"https://api.github.com/users/szimek/orgs","repos_url":"https://api.github.com/users/szimek/repos","events_url":"https://api.github.com/users/szimek/events{/privacy}","received_events_url":"https://api.github.com/users/szimek/received_events","type":"User","site_admin":false},"repo":{"id":8805592,"name":"signature_pad","full_name":"szimek/signature_pad","owner":{"login":"szimek","id":9873,"avatar_url":"https://avatars.githubusercontent.com/u/9873?v=3","gravatar_id":"","url":"https://api.github.com/users/szimek","html_url":"https://github.com/szimek","followers_url":"https://api.github.com/users/szimek/followers","following_url":"https://api.github.com/users/szimek/following{/other_user}","gists_url":"https://api.github.com/users/szimek/gists{/gist_id}","starred_url":"https://api.github.com/users/szimek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szimek/subscriptions","organizations_url":"https://api.github.com/users/szimek/orgs","repos_url":"https://api.github.com/users/szimek/repos","events_url":"https://api.github.com/users/szimek/events{/privacy}","received_events_url":"https://api.github.com/users/szimek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/szimek/signature_pad","description":"HTML5 canvas based smooth signature drawing","fork":false,"url":"https://api.github.com/repos/szimek/signature_pad","forks_url":"https://api.github.com/repos/szimek/signature_pad/forks","keys_url":"https://api.github.com/repos/szimek/signature_pad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/szimek/signature_pad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/szimek/signature_pad/teams","hooks_url":"https://api.github.com/repos/szimek/signature_pad/hooks","issue_events_url":"https://api.github.com/repos/szimek/signature_pad/issues/events{/number}","events_url":"https://api.github.com/repos/szimek/signature_pad/events","assignees_url":"https://api.github.com/repos/szimek/signature_pad/assignees{/user}","branches_url":"https://api.github.com/repos/szimek/signature_pad/branches{/branch}","tags_url":"https://api.github.com/repos/szimek/signature_pad/tags","blobs_url":"https://api.github.com/repos/szimek/signature_pad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/szimek/signature_pad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/szimek/signature_pad/git/refs{/sha}","trees_url":"https://api.github.com/repos/szimek/signature_pad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/szimek/signature_pad/statuses/{sha}","languages_url":"https://api.github.com/repos/szimek/signature_pad/languages","stargazers_url":"https://api.github.com/repos/szimek/signature_pad/stargazers","contributors_url":"https://api.github.com/repos/szimek/signature_pad/contributors","subscribers_url":"https://api.github.com/repos/szimek/signature_pad/subscribers","subscription_url":"https://api.github.com/repos/szimek/signature_pad/subscription","commits_url":"https://api.github.com/repos/szimek/signature_pad/commits{/sha}","git_commits_url":"https://api.github.com/repos/szimek/signature_pad/git/commits{/sha}","comments_url":"https://api.github.com/repos/szimek/signature_pad/comments{/number}","issue_comment_url":"https://api.github.com/repos/szimek/signature_pad/issues/comments{/number}","contents_url":"https://api.github.com/repos/szimek/signature_pad/contents/{+path}","compare_url":"https://api.github.com/repos/szimek/signature_pad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/szimek/signature_pad/merges","archive_url":"https://api.github.com/repos/szimek/signature_pad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/szimek/signature_pad/downloads","issues_url":"https://api.github.com/repos/szimek/signature_pad/issues{/number}","pulls_url":"https://api.github.com/repos/szimek/signature_pad/pulls{/number}","milestones_url":"https://api.github.com/repos/szimek/signature_pad/milestones{/number}","notifications_url":"https://api.github.com/repos/szimek/signature_pad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/szimek/signature_pad/labels{/name}","releases_url":"https://api.github.com/repos/szimek/signature_pad/releases{/id}","deployments_url":"https://api.github.com/repos/szimek/signature_pad/deployments","created_at":"2013-03-15T17:59:57Z","updated_at":"2016-11-27T08:37:52Z","pushed_at":"2016-11-28T13:43:52Z","git_url":"git://github.com/szimek/signature_pad.git","ssh_url":"git@github.com:szimek/signature_pad.git","clone_url":"https://github.com/szimek/signature_pad.git","svn_url":"https://github.com/szimek/signature_pad","homepage":"http://szimek.github.io/signature_pad/","size":298,"stargazers_count":1832,"watchers_count":1832,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":479,"mirror_url":null,"open_issues_count":62,"forks":479,"open_issues":62,"watchers":1832,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/szimek/signature_pad/pulls/198"},"html":{"href":"https://github.com/szimek/signature_pad/pull/198"},"issue":{"href":"https://api.github.com/repos/szimek/signature_pad/issues/198"},"comments":{"href":"https://api.github.com/repos/szimek/signature_pad/issues/198/comments"},"review_comments":{"href":"https://api.github.com/repos/szimek/signature_pad/pulls/198/comments"},"review_comment":{"href":"https://api.github.com/repos/szimek/signature_pad/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/szimek/signature_pad/pulls/198/commits"},"statuses":{"href":"https://api.github.com/repos/szimek/signature_pad/statuses/2e3a453226cade02fa510094cb981c4682128fc9"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":494,"deletions":389,"changed_files":2}}
{"actor":{"display_login":"stephanbrunker"}}