{"action":"created","comment":{"url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/pulls/comments/150046714","pull_request_review_id":75539013,"id":150046714,"diff_hunk":"@@ -478,29 +480,30 @@ export class PdfJsViewer {\n       canvas.removeClass(\"shadow\");\n     }\n     const canvasOffset = canvas.position();\n-    const textLayer = $(\".textLayer\", this.jqRoot);\n+    const textLayer = parent.find(\".textLayer\");\n     textLayer.css({\n       top : canvasOffset.top,\n       left : canvasOffset.left\n     });\n   }\n \n   resetCanvas() {\n-    if (this.pdfPageView) {\n-      this.pdfPageView.destroy();\n-    }\n-    this.pdfPageView = undefined;\n+\t  for (let page of this.loadedPages){\n+\t\t  page.destroy();\n+\t  }\n+\t  this.loadedPages = [];\n     this.jqRoot.empty();\n-    this.queue.clear();\n+    this.queue.clear(); \n   }\n \n-  private openCurrentPage() {\n-    if (this.currentFileUrl) {\n-      let lastCompletedMainFileId = (this.queue.isEmpty() && this.queue.lastCompleted)\n-          ? this.queue.lastCompleted.mainFileId : undefined;\n-      this.show(this.currentFileUrl, this.currentPage, true, lastCompletedMainFileId);\n+  public showPage(page: number) {\n+    if (page > this.numPages){\n+      page = this.numPages;\n     }\n+    let pageWrapper = this.loadedPages.find(x => x.id === page).div;","path":"workspace/viewer/PdfJsViewer.ts","position":141,"original_position":141,"commit_id":"a5884c98e6d436864fec341a53eb856fecfcdf99","original_commit_id":"a5884c98e6d436864fec341a53eb856fecfcdf99","user":{"login":"portuiu","id":15522535,"avatar_url":"https://avatars3.githubusercontent.com/u/15522535?v=4","gravatar_id":"","url":"https://api.github.com/users/portuiu","html_url":"https://github.com/portuiu","followers_url":"https://api.github.com/users/portuiu/followers","following_url":"https://api.github.com/users/portuiu/following{/other_user}","gists_url":"https://api.github.com/users/portuiu/gists{/gist_id}","starred_url":"https://api.github.com/users/portuiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/portuiu/subscriptions","organizations_url":"https://api.github.com/users/portuiu/orgs","repos_url":"https://api.github.com/users/portuiu/repos","events_url":"https://api.github.com/users/portuiu/events{/privacy}","received_events_url":"https://api.github.com/users/portuiu/received_events","type":"User","site_admin":false},"body":"Thank you for the advice. \r\nYes, it's defined by library. `div` is the variable of `PDFPageView` object. It stores `div`, which contains view of page.\r\n`id` is also variable of this object like `div`.","created_at":"2017-11-09T18:28:13Z","updated_at":"2017-11-09T18:28:13Z","html_url":"https://github.com/bardsoftware/papeeria-pdfjs/pull/1#discussion_r150046714","pull_request_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/pulls/1","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/pulls/comments/150046714"},"html":{"href":"https://github.com/bardsoftware/papeeria-pdfjs/pull/1#discussion_r150046714"},"pull_request":{"href":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/pulls/1"}},"in_reply_to_id":150004179},"pull_request":{"url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/pulls/1","id":150431004,"html_url":"https://github.com/bardsoftware/papeeria-pdfjs/pull/1","diff_url":"https://github.com/bardsoftware/papeeria-pdfjs/pull/1.diff","patch_url":"https://github.com/bardsoftware/papeeria-pdfjs/pull/1.patch","issue_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/issues/1","number":1,"state":"open","locked":false,"title":"All pages in place view","user":{"login":"portuiu","id":15522535,"avatar_url":"https://avatars3.githubusercontent.com/u/15522535?v=4","gravatar_id":"","url":"https://api.github.com/users/portuiu","html_url":"https://github.com/portuiu","followers_url":"https://api.github.com/users/portuiu/followers","following_url":"https://api.github.com/users/portuiu/following{/other_user}","gists_url":"https://api.github.com/users/portuiu/gists{/gist_id}","starred_url":"https://api.github.com/users/portuiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/portuiu/subscriptions","organizations_url":"https://api.github.com/users/portuiu/orgs","repos_url":"https://api.github.com/users/portuiu/repos","events_url":"https://api.github.com/users/portuiu/events{/privacy}","received_events_url":"https://api.github.com/users/portuiu/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-11-02T23:49:22Z","updated_at":"2017-11-09T18:28:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69e92e976c0a68fd564a8e1262aca6021e03df40","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/pulls/1/commits","review_comments_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/pulls/1/comments","review_comment_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/issues/1/comments","statuses_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/statuses/a5884c98e6d436864fec341a53eb856fecfcdf99","head":{"label":"portuiu:master","ref":"master","sha":"a5884c98e6d436864fec341a53eb856fecfcdf99","user":{"login":"portuiu","id":15522535,"avatar_url":"https://avatars3.githubusercontent.com/u/15522535?v=4","gravatar_id":"","url":"https://api.github.com/users/portuiu","html_url":"https://github.com/portuiu","followers_url":"https://api.github.com/users/portuiu/followers","following_url":"https://api.github.com/users/portuiu/following{/other_user}","gists_url":"https://api.github.com/users/portuiu/gists{/gist_id}","starred_url":"https://api.github.com/users/portuiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/portuiu/subscriptions","organizations_url":"https://api.github.com/users/portuiu/orgs","repos_url":"https://api.github.com/users/portuiu/repos","events_url":"https://api.github.com/users/portuiu/events{/privacy}","received_events_url":"https://api.github.com/users/portuiu/received_events","type":"User","site_admin":false},"repo":{"id":107029503,"name":"papeeria-pdfjs","full_name":"portuiu/papeeria-pdfjs","owner":{"login":"portuiu","id":15522535,"avatar_url":"https://avatars3.githubusercontent.com/u/15522535?v=4","gravatar_id":"","url":"https://api.github.com/users/portuiu","html_url":"https://github.com/portuiu","followers_url":"https://api.github.com/users/portuiu/followers","following_url":"https://api.github.com/users/portuiu/following{/other_user}","gists_url":"https://api.github.com/users/portuiu/gists{/gist_id}","starred_url":"https://api.github.com/users/portuiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/portuiu/subscriptions","organizations_url":"https://api.github.com/users/portuiu/orgs","repos_url":"https://api.github.com/users/portuiu/repos","events_url":"https://api.github.com/users/portuiu/events{/privacy}","received_events_url":"https://api.github.com/users/portuiu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/portuiu/papeeria-pdfjs","description":null,"fork":true,"url":"https://api.github.com/repos/portuiu/papeeria-pdfjs","forks_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/forks","keys_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/teams","hooks_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/hooks","issue_events_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/issues/events{/number}","events_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/events","assignees_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/assignees{/user}","branches_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/branches{/branch}","tags_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/tags","blobs_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/statuses/{sha}","languages_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/languages","stargazers_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/stargazers","contributors_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/contributors","subscribers_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/subscribers","subscription_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/subscription","commits_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/contents/{+path}","compare_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/merges","archive_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/downloads","issues_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/issues{/number}","pulls_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/pulls{/number}","milestones_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/milestones{/number}","notifications_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/labels{/name}","releases_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/releases{/id}","deployments_url":"https://api.github.com/repos/portuiu/papeeria-pdfjs/deployments","created_at":"2017-10-15T16:35:26Z","updated_at":"2017-11-04T03:38:08Z","pushed_at":"2017-11-09T15:52:15Z","git_url":"git://github.com/portuiu/papeeria-pdfjs.git","ssh_url":"git@github.com:portuiu/papeeria-pdfjs.git","clone_url":"https://github.com/portuiu/papeeria-pdfjs.git","svn_url":"https://github.com/portuiu/papeeria-pdfjs","homepage":null,"size":1147,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bardsoftware:master","ref":"master","sha":"25328708d7b47e4c053d2df68204764da4c82e01","user":{"login":"bardsoftware","id":2625618,"avatar_url":"https://avatars1.githubusercontent.com/u/2625618?v=4","gravatar_id":"","url":"https://api.github.com/users/bardsoftware","html_url":"https://github.com/bardsoftware","followers_url":"https://api.github.com/users/bardsoftware/followers","following_url":"https://api.github.com/users/bardsoftware/following{/other_user}","gists_url":"https://api.github.com/users/bardsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/bardsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bardsoftware/subscriptions","organizations_url":"https://api.github.com/users/bardsoftware/orgs","repos_url":"https://api.github.com/users/bardsoftware/repos","events_url":"https://api.github.com/users/bardsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/bardsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":106555587,"name":"papeeria-pdfjs","full_name":"bardsoftware/papeeria-pdfjs","owner":{"login":"bardsoftware","id":2625618,"avatar_url":"https://avatars1.githubusercontent.com/u/2625618?v=4","gravatar_id":"","url":"https://api.github.com/users/bardsoftware","html_url":"https://github.com/bardsoftware","followers_url":"https://api.github.com/users/bardsoftware/followers","following_url":"https://api.github.com/users/bardsoftware/following{/other_user}","gists_url":"https://api.github.com/users/bardsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/bardsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bardsoftware/subscriptions","organizations_url":"https://api.github.com/users/bardsoftware/orgs","repos_url":"https://api.github.com/users/bardsoftware/repos","events_url":"https://api.github.com/users/bardsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/bardsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bardsoftware/papeeria-pdfjs","description":null,"fork":false,"url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs","forks_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/forks","keys_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/teams","hooks_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/hooks","issue_events_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/issues/events{/number}","events_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/events","assignees_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/assignees{/user}","branches_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/branches{/branch}","tags_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/tags","blobs_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/statuses/{sha}","languages_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/languages","stargazers_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/stargazers","contributors_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/contributors","subscribers_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/subscribers","subscription_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/subscription","commits_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/contents/{+path}","compare_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/merges","archive_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/downloads","issues_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/issues{/number}","pulls_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/pulls{/number}","milestones_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/milestones{/number}","notifications_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/labels{/name}","releases_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/releases{/id}","deployments_url":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/deployments","created_at":"2017-10-11T13:08:59Z","updated_at":"2017-11-04T03:38:23Z","pushed_at":"2017-11-09T15:52:16Z","git_url":"git://github.com/bardsoftware/papeeria-pdfjs.git","ssh_url":"git@github.com:bardsoftware/papeeria-pdfjs.git","clone_url":"https://github.com/bardsoftware/papeeria-pdfjs.git","svn_url":"https://github.com/bardsoftware/papeeria-pdfjs","homepage":null,"size":674,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/pulls/1"},"html":{"href":"https://github.com/bardsoftware/papeeria-pdfjs/pull/1"},"issue":{"href":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/issues/1"},"comments":{"href":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/bardsoftware/papeeria-pdfjs/statuses/a5884c98e6d436864fec341a53eb856fecfcdf99"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"portuiu"}}