{"action":"opened","number":6192,"pull_request":{"url":"https://api.github.com/repos/mozilla/pdf.js/pulls/6192","id":39669445,"html_url":"https://github.com/mozilla/pdf.js/pull/6192","diff_url":"https://github.com/mozilla/pdf.js/pull/6192.diff","patch_url":"https://github.com/mozilla/pdf.js/pull/6192.patch","issue_url":"https://api.github.com/repos/mozilla/pdf.js/issues/6192","number":6192,"state":"open","locked":false,"title":"Refactor the 'resize' event handler in viewer.js (issue 6158)","user":{"login":"Snuffleupagus","id":2692120,"avatar_url":"https://avatars.githubusercontent.com/u/2692120?v=3","gravatar_id":"","url":"https://api.github.com/users/Snuffleupagus","html_url":"https://github.com/Snuffleupagus","followers_url":"https://api.github.com/users/Snuffleupagus/followers","following_url":"https://api.github.com/users/Snuffleupagus/following{/other_user}","gists_url":"https://api.github.com/users/Snuffleupagus/gists{/gist_id}","starred_url":"https://api.github.com/users/Snuffleupagus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snuffleupagus/subscriptions","organizations_url":"https://api.github.com/users/Snuffleupagus/orgs","repos_url":"https://api.github.com/users/Snuffleupagus/repos","events_url":"https://api.github.com/users/Snuffleupagus/events{/privacy}","received_events_url":"https://api.github.com/users/Snuffleupagus/received_events","type":"User","site_admin":false},"body":"*This is the next step towards fixing #6158.*\r\n\r\nThis patch removes the dependency on the state of the scale `<select>` dropdown from the `resize` event handler, and instead uses the (in `PDFViewer`) stored `currentScaleValue`.\r\nI believe that the way this code is currently written is purely for historical reasons, since originally *only* the numerical scale was stored internally (hence there was no other way to access the scale value).\r\nHowever, since we now store the scale value, we should use it instead of quering the DOM. This helps ensure that the internally stored scale value is always accurately displayed in the UI (which should be good since, after the creation of `PDFViewer`, the `<select>` DOM element is now updated by an event handler).\r\n\r\n@timvandermeij Since you've been kind enough to review the previous patches in this series, could you please review this one as well?","created_at":"2015-07-10T10:01:30Z","updated_at":"2015-07-10T10:01:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"timvandermeij","id":1993262,"avatar_url":"https://avatars.githubusercontent.com/u/1993262?v=3","gravatar_id":"","url":"https://api.github.com/users/timvandermeij","html_url":"https://github.com/timvandermeij","followers_url":"https://api.github.com/users/timvandermeij/followers","following_url":"https://api.github.com/users/timvandermeij/following{/other_user}","gists_url":"https://api.github.com/users/timvandermeij/gists{/gist_id}","starred_url":"https://api.github.com/users/timvandermeij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timvandermeij/subscriptions","organizations_url":"https://api.github.com/users/timvandermeij/orgs","repos_url":"https://api.github.com/users/timvandermeij/repos","events_url":"https://api.github.com/users/timvandermeij/events{/privacy}","received_events_url":"https://api.github.com/users/timvandermeij/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/6192/commits","review_comments_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/6192/comments","review_comment_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/issues/6192/comments","statuses_url":"https://api.github.com/repos/mozilla/pdf.js/statuses/35ee1e1b0abf8d9e636beb1d2022256d12e4198a","head":{"label":"Snuffleupagus:viewer-resize-update-scale","ref":"viewer-resize-update-scale","sha":"35ee1e1b0abf8d9e636beb1d2022256d12e4198a","user":{"login":"Snuffleupagus","id":2692120,"avatar_url":"https://avatars.githubusercontent.com/u/2692120?v=3","gravatar_id":"","url":"https://api.github.com/users/Snuffleupagus","html_url":"https://github.com/Snuffleupagus","followers_url":"https://api.github.com/users/Snuffleupagus/followers","following_url":"https://api.github.com/users/Snuffleupagus/following{/other_user}","gists_url":"https://api.github.com/users/Snuffleupagus/gists{/gist_id}","starred_url":"https://api.github.com/users/Snuffleupagus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snuffleupagus/subscriptions","organizations_url":"https://api.github.com/users/Snuffleupagus/orgs","repos_url":"https://api.github.com/users/Snuffleupagus/repos","events_url":"https://api.github.com/users/Snuffleupagus/events{/privacy}","received_events_url":"https://api.github.com/users/Snuffleupagus/received_events","type":"User","site_admin":false},"repo":{"id":7120249,"name":"pdf.js","full_name":"Snuffleupagus/pdf.js","owner":{"login":"Snuffleupagus","id":2692120,"avatar_url":"https://avatars.githubusercontent.com/u/2692120?v=3","gravatar_id":"","url":"https://api.github.com/users/Snuffleupagus","html_url":"https://github.com/Snuffleupagus","followers_url":"https://api.github.com/users/Snuffleupagus/followers","following_url":"https://api.github.com/users/Snuffleupagus/following{/other_user}","gists_url":"https://api.github.com/users/Snuffleupagus/gists{/gist_id}","starred_url":"https://api.github.com/users/Snuffleupagus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snuffleupagus/subscriptions","organizations_url":"https://api.github.com/users/Snuffleupagus/orgs","repos_url":"https://api.github.com/users/Snuffleupagus/repos","events_url":"https://api.github.com/users/Snuffleupagus/events{/privacy}","received_events_url":"https://api.github.com/users/Snuffleupagus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Snuffleupagus/pdf.js","description":"PDF Reader in JavaScript","fork":true,"url":"https://api.github.com/repos/Snuffleupagus/pdf.js","forks_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/forks","keys_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/teams","hooks_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/hooks","issue_events_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/issues/events{/number}","events_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/events","assignees_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/assignees{/user}","branches_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/branches{/branch}","tags_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/tags","blobs_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/statuses/{sha}","languages_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/languages","stargazers_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/stargazers","contributors_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/contributors","subscribers_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/subscribers","subscription_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/subscription","commits_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/contents/{+path}","compare_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/merges","archive_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/downloads","issues_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/issues{/number}","pulls_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/pulls{/number}","milestones_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/milestones{/number}","notifications_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/labels{/name}","releases_url":"https://api.github.com/repos/Snuffleupagus/pdf.js/releases{/id}","created_at":"2012-12-11T22:06:46Z","updated_at":"2015-05-08T20:06:28Z","pushed_at":"2015-07-10T09:51:07Z","git_url":"git://github.com/Snuffleupagus/pdf.js.git","ssh_url":"git@github.com:Snuffleupagus/pdf.js.git","clone_url":"https://github.com/Snuffleupagus/pdf.js.git","svn_url":"https://github.com/Snuffleupagus/pdf.js","homepage":"","size":53772,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"ccfafea20b9c70ea69a175fcbdf2732e4b6598fb","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":1663468,"name":"pdf.js","full_name":"mozilla/pdf.js","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/pdf.js","description":"PDF Reader in JavaScript","fork":false,"url":"https://api.github.com/repos/mozilla/pdf.js","forks_url":"https://api.github.com/repos/mozilla/pdf.js/forks","keys_url":"https://api.github.com/repos/mozilla/pdf.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/pdf.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/pdf.js/teams","hooks_url":"https://api.github.com/repos/mozilla/pdf.js/hooks","issue_events_url":"https://api.github.com/repos/mozilla/pdf.js/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/pdf.js/events","assignees_url":"https://api.github.com/repos/mozilla/pdf.js/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/pdf.js/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/pdf.js/tags","blobs_url":"https://api.github.com/repos/mozilla/pdf.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/pdf.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/pdf.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/pdf.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/pdf.js/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/pdf.js/languages","stargazers_url":"https://api.github.com/repos/mozilla/pdf.js/stargazers","contributors_url":"https://api.github.com/repos/mozilla/pdf.js/contributors","subscribers_url":"https://api.github.com/repos/mozilla/pdf.js/subscribers","subscription_url":"https://api.github.com/repos/mozilla/pdf.js/subscription","commits_url":"https://api.github.com/repos/mozilla/pdf.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/pdf.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/pdf.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/pdf.js/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/pdf.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/pdf.js/merges","archive_url":"https://api.github.com/repos/mozilla/pdf.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/pdf.js/downloads","issues_url":"https://api.github.com/repos/mozilla/pdf.js/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/pdf.js/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/pdf.js/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/pdf.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/pdf.js/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/pdf.js/releases{/id}","created_at":"2011-04-26T06:32:03Z","updated_at":"2015-07-10T09:21:36Z","pushed_at":"2015-07-10T08:25:06Z","git_url":"git://github.com/mozilla/pdf.js.git","ssh_url":"git@github.com:mozilla/pdf.js.git","clone_url":"https://github.com/mozilla/pdf.js.git","svn_url":"https://github.com/mozilla/pdf.js","homepage":"","size":115217,"stargazers_count":12058,"watchers_count":12058,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2734,"mirror_url":null,"open_issues_count":549,"forks":2734,"open_issues":549,"watchers":12058,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/6192"},"html":{"href":"https://github.com/mozilla/pdf.js/pull/6192"},"issue":{"href":"https://api.github.com/repos/mozilla/pdf.js/issues/6192"},"comments":{"href":"https://api.github.com/repos/mozilla/pdf.js/issues/6192/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/6192/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/6192/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/pdf.js/statuses/35ee1e1b0abf8d9e636beb1d2022256d12e4198a"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":11,"deletions":8,"changed_files":1}}