{"action":"created","comment":{"url":"https://api.github.com/repos/JeffSwenson/duckling/pulls/comments/62607081","id":62607081,"diff_hunk":"@@ -0,0 +1,97 @@\n+import {\n+    Component,\n+    ElementRef,\n+    Input,\n+    OnChanges,\n+    OnDestroy,\n+    OnInit,\n+    SimpleChange,\n+    ViewChild\n+} from 'angular2/core';\n+import {Observable} from 'rxjs';\n+import {autoDetectRenderer, DisplayObject, WebGLRenderer, CanvasRenderer} from 'pixi.js';\n+import {BaseTool} from './tools/base-tool';\n+import {Vector} from '../math';\n+import {isMouseButtonPressed, MouseButton} from '../util';\n+\n+/**\n+ * The Canvas Component is used to render pixijs display objects and wire up Tools.\n+ */\n+@Component({\n+    selector: 'dk-canvas',\n+    template: `\n+        <canvas\n+            #canvas\n+            (mousedown)=\"onMouseDown($event)\"\n+            (mouseup)=\"onMouseUp($event)\"\n+            (mousemove)=\"onMouseDrag($event)\"\n+            (mouseout)=\"onMouseOut()\"\n+            [height]=\"height\"\n+            [width]=\"width\">\n+        </canvas>\n+    `\n+})\n+export class Canvas implements OnChanges, OnDestroy {","path":"src/duckling/canvas/canvas.component.ts","position":34,"original_position":34,"commit_id":"5061a5b5458934f8a308b8e2c7a516b8c829b2e8","original_commit_id":"5061a5b5458934f8a308b8e2c7a516b8c829b2e8","user":{"login":"JeffSwenson","id":5283435,"avatar_url":"https://avatars.githubusercontent.com/u/5283435?v=3","gravatar_id":"","url":"https://api.github.com/users/JeffSwenson","html_url":"https://github.com/JeffSwenson","followers_url":"https://api.github.com/users/JeffSwenson/followers","following_url":"https://api.github.com/users/JeffSwenson/following{/other_user}","gists_url":"https://api.github.com/users/JeffSwenson/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffSwenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffSwenson/subscriptions","organizations_url":"https://api.github.com/users/JeffSwenson/orgs","repos_url":"https://api.github.com/users/JeffSwenson/repos","events_url":"https://api.github.com/users/JeffSwenson/events{/privacy}","received_events_url":"https://api.github.com/users/JeffSwenson/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2016-05-10T03:15:34Z","updated_at":"2016-05-10T03:15:34Z","html_url":"https://github.com/JeffSwenson/duckling/pull/25#discussion_r62607081","pull_request_url":"https://api.github.com/repos/JeffSwenson/duckling/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/JeffSwenson/duckling/pulls/comments/62607081"},"html":{"href":"https://github.com/JeffSwenson/duckling/pull/25#discussion_r62607081"},"pull_request":{"href":"https://api.github.com/repos/JeffSwenson/duckling/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/JeffSwenson/duckling/pulls/25","id":67661789,"html_url":"https://github.com/JeffSwenson/duckling/pull/25","diff_url":"https://github.com/JeffSwenson/duckling/pull/25.diff","patch_url":"https://github.com/JeffSwenson/duckling/pull/25.patch","issue_url":"https://api.github.com/repos/JeffSwenson/duckling/issues/25","number":25,"state":"open","locked":false,"title":"Implement canvas","user":{"login":"JeffSwenson","id":5283435,"avatar_url":"https://avatars.githubusercontent.com/u/5283435?v=3","gravatar_id":"","url":"https://api.github.com/users/JeffSwenson","html_url":"https://github.com/JeffSwenson","followers_url":"https://api.github.com/users/JeffSwenson/followers","following_url":"https://api.github.com/users/JeffSwenson/following{/other_user}","gists_url":"https://api.github.com/users/JeffSwenson/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffSwenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffSwenson/subscriptions","organizations_url":"https://api.github.com/users/JeffSwenson/orgs","repos_url":"https://api.github.com/users/JeffSwenson/repos","events_url":"https://api.github.com/users/JeffSwenson/events{/privacy}","received_events_url":"https://api.github.com/users/JeffSwenson/received_events","type":"User","site_admin":false},"body":"Resolves #18 ","created_at":"2016-04-25T03:17:15Z","updated_at":"2016-05-10T03:15:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"da2b62cf86e01ed22c2273ffe7d4c695f81d6f1b","assignee":{"login":"tlein","id":815242,"avatar_url":"https://avatars.githubusercontent.com/u/815242?v=3","gravatar_id":"","url":"https://api.github.com/users/tlein","html_url":"https://github.com/tlein","followers_url":"https://api.github.com/users/tlein/followers","following_url":"https://api.github.com/users/tlein/following{/other_user}","gists_url":"https://api.github.com/users/tlein/gists{/gist_id}","starred_url":"https://api.github.com/users/tlein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlein/subscriptions","organizations_url":"https://api.github.com/users/tlein/orgs","repos_url":"https://api.github.com/users/tlein/repos","events_url":"https://api.github.com/users/tlein/events{/privacy}","received_events_url":"https://api.github.com/users/tlein/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/JeffSwenson/duckling/pulls/25/commits","review_comments_url":"https://api.github.com/repos/JeffSwenson/duckling/pulls/25/comments","review_comment_url":"https://api.github.com/repos/JeffSwenson/duckling/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JeffSwenson/duckling/issues/25/comments","statuses_url":"https://api.github.com/repos/JeffSwenson/duckling/statuses/5061a5b5458934f8a308b8e2c7a516b8c829b2e8","head":{"label":"JeffSwenson:implement-canvas","ref":"implement-canvas","sha":"5061a5b5458934f8a308b8e2c7a516b8c829b2e8","user":{"login":"JeffSwenson","id":5283435,"avatar_url":"https://avatars.githubusercontent.com/u/5283435?v=3","gravatar_id":"","url":"https://api.github.com/users/JeffSwenson","html_url":"https://github.com/JeffSwenson","followers_url":"https://api.github.com/users/JeffSwenson/followers","following_url":"https://api.github.com/users/JeffSwenson/following{/other_user}","gists_url":"https://api.github.com/users/JeffSwenson/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffSwenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffSwenson/subscriptions","organizations_url":"https://api.github.com/users/JeffSwenson/orgs","repos_url":"https://api.github.com/users/JeffSwenson/repos","events_url":"https://api.github.com/users/JeffSwenson/events{/privacy}","received_events_url":"https://api.github.com/users/JeffSwenson/received_events","type":"User","site_admin":false},"repo":{"id":48004646,"name":"duckling","full_name":"JeffSwenson/duckling","owner":{"login":"JeffSwenson","id":5283435,"avatar_url":"https://avatars.githubusercontent.com/u/5283435?v=3","gravatar_id":"","url":"https://api.github.com/users/JeffSwenson","html_url":"https://github.com/JeffSwenson","followers_url":"https://api.github.com/users/JeffSwenson/followers","following_url":"https://api.github.com/users/JeffSwenson/following{/other_user}","gists_url":"https://api.github.com/users/JeffSwenson/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffSwenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffSwenson/subscriptions","organizations_url":"https://api.github.com/users/JeffSwenson/orgs","repos_url":"https://api.github.com/users/JeffSwenson/repos","events_url":"https://api.github.com/users/JeffSwenson/events{/privacy}","received_events_url":"https://api.github.com/users/JeffSwenson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JeffSwenson/duckling","description":"Duckling is an editor built for the Ancona game engine.  See tlein/Ancona.","fork":false,"url":"https://api.github.com/repos/JeffSwenson/duckling","forks_url":"https://api.github.com/repos/JeffSwenson/duckling/forks","keys_url":"https://api.github.com/repos/JeffSwenson/duckling/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JeffSwenson/duckling/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JeffSwenson/duckling/teams","hooks_url":"https://api.github.com/repos/JeffSwenson/duckling/hooks","issue_events_url":"https://api.github.com/repos/JeffSwenson/duckling/issues/events{/number}","events_url":"https://api.github.com/repos/JeffSwenson/duckling/events","assignees_url":"https://api.github.com/repos/JeffSwenson/duckling/assignees{/user}","branches_url":"https://api.github.com/repos/JeffSwenson/duckling/branches{/branch}","tags_url":"https://api.github.com/repos/JeffSwenson/duckling/tags","blobs_url":"https://api.github.com/repos/JeffSwenson/duckling/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JeffSwenson/duckling/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JeffSwenson/duckling/git/refs{/sha}","trees_url":"https://api.github.com/repos/JeffSwenson/duckling/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JeffSwenson/duckling/statuses/{sha}","languages_url":"https://api.github.com/repos/JeffSwenson/duckling/languages","stargazers_url":"https://api.github.com/repos/JeffSwenson/duckling/stargazers","contributors_url":"https://api.github.com/repos/JeffSwenson/duckling/contributors","subscribers_url":"https://api.github.com/repos/JeffSwenson/duckling/subscribers","subscription_url":"https://api.github.com/repos/JeffSwenson/duckling/subscription","commits_url":"https://api.github.com/repos/JeffSwenson/duckling/commits{/sha}","git_commits_url":"https://api.github.com/repos/JeffSwenson/duckling/git/commits{/sha}","comments_url":"https://api.github.com/repos/JeffSwenson/duckling/comments{/number}","issue_comment_url":"https://api.github.com/repos/JeffSwenson/duckling/issues/comments{/number}","contents_url":"https://api.github.com/repos/JeffSwenson/duckling/contents/{+path}","compare_url":"https://api.github.com/repos/JeffSwenson/duckling/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JeffSwenson/duckling/merges","archive_url":"https://api.github.com/repos/JeffSwenson/duckling/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JeffSwenson/duckling/downloads","issues_url":"https://api.github.com/repos/JeffSwenson/duckling/issues{/number}","pulls_url":"https://api.github.com/repos/JeffSwenson/duckling/pulls{/number}","milestones_url":"https://api.github.com/repos/JeffSwenson/duckling/milestones{/number}","notifications_url":"https://api.github.com/repos/JeffSwenson/duckling/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JeffSwenson/duckling/labels{/name}","releases_url":"https://api.github.com/repos/JeffSwenson/duckling/releases{/id}","deployments_url":"https://api.github.com/repos/JeffSwenson/duckling/deployments","created_at":"2015-12-14T22:22:00Z","updated_at":"2016-01-31T17:45:36Z","pushed_at":"2016-05-10T00:25:13Z","git_url":"git://github.com/JeffSwenson/duckling.git","ssh_url":"git@github.com:JeffSwenson/duckling.git","clone_url":"https://github.com/JeffSwenson/duckling.git","svn_url":"https://github.com/JeffSwenson/duckling","homepage":null,"size":2825,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":13,"forks":0,"open_issues":13,"watchers":2,"default_branch":"develop"}},"base":{"label":"JeffSwenson:rewrite-everything","ref":"rewrite-everything","sha":"e6860bdafe42e1c863dbc29c80e42d61d2b3c3a3","user":{"login":"JeffSwenson","id":5283435,"avatar_url":"https://avatars.githubusercontent.com/u/5283435?v=3","gravatar_id":"","url":"https://api.github.com/users/JeffSwenson","html_url":"https://github.com/JeffSwenson","followers_url":"https://api.github.com/users/JeffSwenson/followers","following_url":"https://api.github.com/users/JeffSwenson/following{/other_user}","gists_url":"https://api.github.com/users/JeffSwenson/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffSwenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffSwenson/subscriptions","organizations_url":"https://api.github.com/users/JeffSwenson/orgs","repos_url":"https://api.github.com/users/JeffSwenson/repos","events_url":"https://api.github.com/users/JeffSwenson/events{/privacy}","received_events_url":"https://api.github.com/users/JeffSwenson/received_events","type":"User","site_admin":false},"repo":{"id":48004646,"name":"duckling","full_name":"JeffSwenson/duckling","owner":{"login":"JeffSwenson","id":5283435,"avatar_url":"https://avatars.githubusercontent.com/u/5283435?v=3","gravatar_id":"","url":"https://api.github.com/users/JeffSwenson","html_url":"https://github.com/JeffSwenson","followers_url":"https://api.github.com/users/JeffSwenson/followers","following_url":"https://api.github.com/users/JeffSwenson/following{/other_user}","gists_url":"https://api.github.com/users/JeffSwenson/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffSwenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffSwenson/subscriptions","organizations_url":"https://api.github.com/users/JeffSwenson/orgs","repos_url":"https://api.github.com/users/JeffSwenson/repos","events_url":"https://api.github.com/users/JeffSwenson/events{/privacy}","received_events_url":"https://api.github.com/users/JeffSwenson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JeffSwenson/duckling","description":"Duckling is an editor built for the Ancona game engine.  See tlein/Ancona.","fork":false,"url":"https://api.github.com/repos/JeffSwenson/duckling","forks_url":"https://api.github.com/repos/JeffSwenson/duckling/forks","keys_url":"https://api.github.com/repos/JeffSwenson/duckling/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JeffSwenson/duckling/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JeffSwenson/duckling/teams","hooks_url":"https://api.github.com/repos/JeffSwenson/duckling/hooks","issue_events_url":"https://api.github.com/repos/JeffSwenson/duckling/issues/events{/number}","events_url":"https://api.github.com/repos/JeffSwenson/duckling/events","assignees_url":"https://api.github.com/repos/JeffSwenson/duckling/assignees{/user}","branches_url":"https://api.github.com/repos/JeffSwenson/duckling/branches{/branch}","tags_url":"https://api.github.com/repos/JeffSwenson/duckling/tags","blobs_url":"https://api.github.com/repos/JeffSwenson/duckling/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JeffSwenson/duckling/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JeffSwenson/duckling/git/refs{/sha}","trees_url":"https://api.github.com/repos/JeffSwenson/duckling/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JeffSwenson/duckling/statuses/{sha}","languages_url":"https://api.github.com/repos/JeffSwenson/duckling/languages","stargazers_url":"https://api.github.com/repos/JeffSwenson/duckling/stargazers","contributors_url":"https://api.github.com/repos/JeffSwenson/duckling/contributors","subscribers_url":"https://api.github.com/repos/JeffSwenson/duckling/subscribers","subscription_url":"https://api.github.com/repos/JeffSwenson/duckling/subscription","commits_url":"https://api.github.com/repos/JeffSwenson/duckling/commits{/sha}","git_commits_url":"https://api.github.com/repos/JeffSwenson/duckling/git/commits{/sha}","comments_url":"https://api.github.com/repos/JeffSwenson/duckling/comments{/number}","issue_comment_url":"https://api.github.com/repos/JeffSwenson/duckling/issues/comments{/number}","contents_url":"https://api.github.com/repos/JeffSwenson/duckling/contents/{+path}","compare_url":"https://api.github.com/repos/JeffSwenson/duckling/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JeffSwenson/duckling/merges","archive_url":"https://api.github.com/repos/JeffSwenson/duckling/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JeffSwenson/duckling/downloads","issues_url":"https://api.github.com/repos/JeffSwenson/duckling/issues{/number}","pulls_url":"https://api.github.com/repos/JeffSwenson/duckling/pulls{/number}","milestones_url":"https://api.github.com/repos/JeffSwenson/duckling/milestones{/number}","notifications_url":"https://api.github.com/repos/JeffSwenson/duckling/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JeffSwenson/duckling/labels{/name}","releases_url":"https://api.github.com/repos/JeffSwenson/duckling/releases{/id}","deployments_url":"https://api.github.com/repos/JeffSwenson/duckling/deployments","created_at":"2015-12-14T22:22:00Z","updated_at":"2016-01-31T17:45:36Z","pushed_at":"2016-05-10T00:25:13Z","git_url":"git://github.com/JeffSwenson/duckling.git","ssh_url":"git@github.com:JeffSwenson/duckling.git","clone_url":"https://github.com/JeffSwenson/duckling.git","svn_url":"https://github.com/JeffSwenson/duckling","homepage":null,"size":2825,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":13,"forks":0,"open_issues":13,"watchers":2,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/JeffSwenson/duckling/pulls/25"},"html":{"href":"https://github.com/JeffSwenson/duckling/pull/25"},"issue":{"href":"https://api.github.com/repos/JeffSwenson/duckling/issues/25"},"comments":{"href":"https://api.github.com/repos/JeffSwenson/duckling/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/JeffSwenson/duckling/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/JeffSwenson/duckling/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JeffSwenson/duckling/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/JeffSwenson/duckling/statuses/5061a5b5458934f8a308b8e2c7a516b8c829b2e8"}}}}