{"action":"created","comment":{"url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/comments/23788181","id":23788181,"diff_hunk":"@@ -816,6 +816,32 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){\n                     canvasElement.getContext( '2d' ) );\n     }());\n \n+    /**\n+     * @private\n+     * @inner\n+     * @function\n+     * @returns {Number} The device's pixel density ratio, or null if canvas isn't supported by the browser.\n+     */\n+    $.pixelDensityRatio = (function () {\n+        if ( $.supportsCanvas ) {\n+            var context = document.createElement('canvas').getContext('2d');\n+            var devicePixelRatio = window.devicePixelRatio || 1;\n+            var backingStoreRatio = context.webkitBackingStorePixelRatio ||\n+                                    context.mozBackingStorePixelRatio ||\n+                                    context.msBackingStorePixelRatio ||\n+                                    context.oBackingStorePixelRatio ||\n+                                    context.backingStorePixelRatio || 1;\n+            return devicePixelRatio / backingStoreRatio;\n+            // var viewportSize = this.viewport.getContainerSize();","path":"src/openseadragon.js","position":20,"original_position":20,"commit_id":"3402d33088b067eea6cc9ddc379df2fadf855a53","original_commit_id":"3402d33088b067eea6cc9ddc379df2fadf855a53","user":{"login":"iangilman","id":338989,"avatar_url":"https://avatars.githubusercontent.com/u/338989?v=3","gravatar_id":"","url":"https://api.github.com/users/iangilman","html_url":"https://github.com/iangilman","followers_url":"https://api.github.com/users/iangilman/followers","following_url":"https://api.github.com/users/iangilman/following{/other_user}","gists_url":"https://api.github.com/users/iangilman/gists{/gist_id}","starred_url":"https://api.github.com/users/iangilman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iangilman/subscriptions","organizations_url":"https://api.github.com/users/iangilman/orgs","repos_url":"https://api.github.com/users/iangilman/repos","events_url":"https://api.github.com/users/iangilman/events{/privacy}","received_events_url":"https://api.github.com/users/iangilman/received_events","type":"User","site_admin":false},"body":"Please remove these commented out lines ","created_at":"2015-01-29T18:05:35Z","updated_at":"2015-01-29T18:05:35Z","html_url":"https://github.com/openseadragon/openseadragon/pull/583#discussion_r23788181","pull_request_url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/583","_links":{"self":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/comments/23788181"},"html":{"href":"https://github.com/openseadragon/openseadragon/pull/583#discussion_r23788181"},"pull_request":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/583"}}},"pull_request":{"url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/583","id":28293043,"html_url":"https://github.com/openseadragon/openseadragon/pull/583","diff_url":"https://github.com/openseadragon/openseadragon/pull/583.diff","patch_url":"https://github.com/openseadragon/openseadragon/pull/583.patch","issue_url":"https://api.github.com/repos/openseadragon/openseadragon/issues/583","number":583,"state":"open","locked":false,"title":"WIP basic high pixel density support re: openseadragon/openseadragon#541","user":{"login":"wesleyfok","id":3732772,"avatar_url":"https://avatars.githubusercontent.com/u/3732772?v=3","gravatar_id":"","url":"https://api.github.com/users/wesleyfok","html_url":"https://github.com/wesleyfok","followers_url":"https://api.github.com/users/wesleyfok/followers","following_url":"https://api.github.com/users/wesleyfok/following{/other_user}","gists_url":"https://api.github.com/users/wesleyfok/gists{/gist_id}","starred_url":"https://api.github.com/users/wesleyfok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wesleyfok/subscriptions","organizations_url":"https://api.github.com/users/wesleyfok/orgs","repos_url":"https://api.github.com/users/wesleyfok/repos","events_url":"https://api.github.com/users/wesleyfok/events{/privacy}","received_events_url":"https://api.github.com/users/wesleyfok/received_events","type":"User","site_admin":false},"body":"I think I got all the various translation methods between coordinate systems to be aware of the device's pixel density now, but there are still problems with intercepting mouse/touch events and scaling them properly to the viewport's (I think?) coordinate system (i.e. the canvas will see a pinch-zoom action in the bottom-right of the screen and set the zoom center to the middle of the canvas if the pixel density ratio is 2x).\r\n\r\nApologies in advance if this isn't how pull requests are supposed to work, I'm still learning the github ropes!","created_at":"2015-01-29T16:31:43Z","updated_at":"2015-01-29T18:05:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1cd2888b7a534b1449ff70c94ddd0d8ab1b7b76","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/583/commits","review_comments_url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/583/comments","review_comment_url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/comments/{number}","comments_url":"https://api.github.com/repos/openseadragon/openseadragon/issues/583/comments","statuses_url":"https://api.github.com/repos/openseadragon/openseadragon/statuses/3402d33088b067eea6cc9ddc379df2fadf855a53","head":{"label":"wesleyfok:collections","ref":"collections","sha":"3402d33088b067eea6cc9ddc379df2fadf855a53","user":{"login":"wesleyfok","id":3732772,"avatar_url":"https://avatars.githubusercontent.com/u/3732772?v=3","gravatar_id":"","url":"https://api.github.com/users/wesleyfok","html_url":"https://github.com/wesleyfok","followers_url":"https://api.github.com/users/wesleyfok/followers","following_url":"https://api.github.com/users/wesleyfok/following{/other_user}","gists_url":"https://api.github.com/users/wesleyfok/gists{/gist_id}","starred_url":"https://api.github.com/users/wesleyfok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wesleyfok/subscriptions","organizations_url":"https://api.github.com/users/wesleyfok/orgs","repos_url":"https://api.github.com/users/wesleyfok/repos","events_url":"https://api.github.com/users/wesleyfok/events{/privacy}","received_events_url":"https://api.github.com/users/wesleyfok/received_events","type":"User","site_admin":false},"repo":{"id":29987799,"name":"openseadragon","full_name":"wesleyfok/openseadragon","owner":{"login":"wesleyfok","id":3732772,"avatar_url":"https://avatars.githubusercontent.com/u/3732772?v=3","gravatar_id":"","url":"https://api.github.com/users/wesleyfok","html_url":"https://github.com/wesleyfok","followers_url":"https://api.github.com/users/wesleyfok/followers","following_url":"https://api.github.com/users/wesleyfok/following{/other_user}","gists_url":"https://api.github.com/users/wesleyfok/gists{/gist_id}","starred_url":"https://api.github.com/users/wesleyfok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wesleyfok/subscriptions","organizations_url":"https://api.github.com/users/wesleyfok/orgs","repos_url":"https://api.github.com/users/wesleyfok/repos","events_url":"https://api.github.com/users/wesleyfok/events{/privacy}","received_events_url":"https://api.github.com/users/wesleyfok/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wesleyfok/openseadragon","description":"An open-source, web-based viewer for zoomable images, implemented in pure JavaScript. ","fork":true,"url":"https://api.github.com/repos/wesleyfok/openseadragon","forks_url":"https://api.github.com/repos/wesleyfok/openseadragon/forks","keys_url":"https://api.github.com/repos/wesleyfok/openseadragon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wesleyfok/openseadragon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wesleyfok/openseadragon/teams","hooks_url":"https://api.github.com/repos/wesleyfok/openseadragon/hooks","issue_events_url":"https://api.github.com/repos/wesleyfok/openseadragon/issues/events{/number}","events_url":"https://api.github.com/repos/wesleyfok/openseadragon/events","assignees_url":"https://api.github.com/repos/wesleyfok/openseadragon/assignees{/user}","branches_url":"https://api.github.com/repos/wesleyfok/openseadragon/branches{/branch}","tags_url":"https://api.github.com/repos/wesleyfok/openseadragon/tags","blobs_url":"https://api.github.com/repos/wesleyfok/openseadragon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wesleyfok/openseadragon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wesleyfok/openseadragon/git/refs{/sha}","trees_url":"https://api.github.com/repos/wesleyfok/openseadragon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wesleyfok/openseadragon/statuses/{sha}","languages_url":"https://api.github.com/repos/wesleyfok/openseadragon/languages","stargazers_url":"https://api.github.com/repos/wesleyfok/openseadragon/stargazers","contributors_url":"https://api.github.com/repos/wesleyfok/openseadragon/contributors","subscribers_url":"https://api.github.com/repos/wesleyfok/openseadragon/subscribers","subscription_url":"https://api.github.com/repos/wesleyfok/openseadragon/subscription","commits_url":"https://api.github.com/repos/wesleyfok/openseadragon/commits{/sha}","git_commits_url":"https://api.github.com/repos/wesleyfok/openseadragon/git/commits{/sha}","comments_url":"https://api.github.com/repos/wesleyfok/openseadragon/comments{/number}","issue_comment_url":"https://api.github.com/repos/wesleyfok/openseadragon/issues/comments/{number}","contents_url":"https://api.github.com/repos/wesleyfok/openseadragon/contents/{+path}","compare_url":"https://api.github.com/repos/wesleyfok/openseadragon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wesleyfok/openseadragon/merges","archive_url":"https://api.github.com/repos/wesleyfok/openseadragon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wesleyfok/openseadragon/downloads","issues_url":"https://api.github.com/repos/wesleyfok/openseadragon/issues{/number}","pulls_url":"https://api.github.com/repos/wesleyfok/openseadragon/pulls{/number}","milestones_url":"https://api.github.com/repos/wesleyfok/openseadragon/milestones{/number}","notifications_url":"https://api.github.com/repos/wesleyfok/openseadragon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wesleyfok/openseadragon/labels{/name}","releases_url":"https://api.github.com/repos/wesleyfok/openseadragon/releases{/id}","created_at":"2015-01-28T20:55:03Z","updated_at":"2015-01-28T20:55:05Z","pushed_at":"2015-01-29T16:21:29Z","git_url":"git://github.com/wesleyfok/openseadragon.git","ssh_url":"git@github.com:wesleyfok/openseadragon.git","clone_url":"https://github.com/wesleyfok/openseadragon.git","svn_url":"https://github.com/wesleyfok/openseadragon","homepage":"http://openseadragon.github.io/","size":10730,"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":"openseadragon:collections","ref":"collections","sha":"dc1a7c9cc5d4731e67b3a0f7f70ae28ffaa9f466","user":{"login":"openseadragon","id":3392630,"avatar_url":"https://avatars.githubusercontent.com/u/3392630?v=3","gravatar_id":"","url":"https://api.github.com/users/openseadragon","html_url":"https://github.com/openseadragon","followers_url":"https://api.github.com/users/openseadragon/followers","following_url":"https://api.github.com/users/openseadragon/following{/other_user}","gists_url":"https://api.github.com/users/openseadragon/gists{/gist_id}","starred_url":"https://api.github.com/users/openseadragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openseadragon/subscriptions","organizations_url":"https://api.github.com/users/openseadragon/orgs","repos_url":"https://api.github.com/users/openseadragon/repos","events_url":"https://api.github.com/users/openseadragon/events{/privacy}","received_events_url":"https://api.github.com/users/openseadragon/received_events","type":"Organization","site_admin":false},"repo":{"id":7941882,"name":"openseadragon","full_name":"openseadragon/openseadragon","owner":{"login":"openseadragon","id":3392630,"avatar_url":"https://avatars.githubusercontent.com/u/3392630?v=3","gravatar_id":"","url":"https://api.github.com/users/openseadragon","html_url":"https://github.com/openseadragon","followers_url":"https://api.github.com/users/openseadragon/followers","following_url":"https://api.github.com/users/openseadragon/following{/other_user}","gists_url":"https://api.github.com/users/openseadragon/gists{/gist_id}","starred_url":"https://api.github.com/users/openseadragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openseadragon/subscriptions","organizations_url":"https://api.github.com/users/openseadragon/orgs","repos_url":"https://api.github.com/users/openseadragon/repos","events_url":"https://api.github.com/users/openseadragon/events{/privacy}","received_events_url":"https://api.github.com/users/openseadragon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openseadragon/openseadragon","description":"An open-source, web-based viewer for zoomable images, implemented in pure JavaScript. ","fork":false,"url":"https://api.github.com/repos/openseadragon/openseadragon","forks_url":"https://api.github.com/repos/openseadragon/openseadragon/forks","keys_url":"https://api.github.com/repos/openseadragon/openseadragon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openseadragon/openseadragon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openseadragon/openseadragon/teams","hooks_url":"https://api.github.com/repos/openseadragon/openseadragon/hooks","issue_events_url":"https://api.github.com/repos/openseadragon/openseadragon/issues/events{/number}","events_url":"https://api.github.com/repos/openseadragon/openseadragon/events","assignees_url":"https://api.github.com/repos/openseadragon/openseadragon/assignees{/user}","branches_url":"https://api.github.com/repos/openseadragon/openseadragon/branches{/branch}","tags_url":"https://api.github.com/repos/openseadragon/openseadragon/tags","blobs_url":"https://api.github.com/repos/openseadragon/openseadragon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openseadragon/openseadragon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openseadragon/openseadragon/git/refs{/sha}","trees_url":"https://api.github.com/repos/openseadragon/openseadragon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openseadragon/openseadragon/statuses/{sha}","languages_url":"https://api.github.com/repos/openseadragon/openseadragon/languages","stargazers_url":"https://api.github.com/repos/openseadragon/openseadragon/stargazers","contributors_url":"https://api.github.com/repos/openseadragon/openseadragon/contributors","subscribers_url":"https://api.github.com/repos/openseadragon/openseadragon/subscribers","subscription_url":"https://api.github.com/repos/openseadragon/openseadragon/subscription","commits_url":"https://api.github.com/repos/openseadragon/openseadragon/commits{/sha}","git_commits_url":"https://api.github.com/repos/openseadragon/openseadragon/git/commits{/sha}","comments_url":"https://api.github.com/repos/openseadragon/openseadragon/comments{/number}","issue_comment_url":"https://api.github.com/repos/openseadragon/openseadragon/issues/comments/{number}","contents_url":"https://api.github.com/repos/openseadragon/openseadragon/contents/{+path}","compare_url":"https://api.github.com/repos/openseadragon/openseadragon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openseadragon/openseadragon/merges","archive_url":"https://api.github.com/repos/openseadragon/openseadragon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openseadragon/openseadragon/downloads","issues_url":"https://api.github.com/repos/openseadragon/openseadragon/issues{/number}","pulls_url":"https://api.github.com/repos/openseadragon/openseadragon/pulls{/number}","milestones_url":"https://api.github.com/repos/openseadragon/openseadragon/milestones{/number}","notifications_url":"https://api.github.com/repos/openseadragon/openseadragon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openseadragon/openseadragon/labels{/name}","releases_url":"https://api.github.com/repos/openseadragon/openseadragon/releases{/id}","created_at":"2013-01-31T17:44:24Z","updated_at":"2015-01-27T11:02:02Z","pushed_at":"2015-01-21T23:30:38Z","git_url":"git://github.com/openseadragon/openseadragon.git","ssh_url":"git@github.com:openseadragon/openseadragon.git","clone_url":"https://github.com/openseadragon/openseadragon.git","svn_url":"https://github.com/openseadragon/openseadragon","homepage":"http://openseadragon.github.io/","size":10730,"stargazers_count":293,"watchers_count":293,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":135,"mirror_url":null,"open_issues_count":133,"forks":135,"open_issues":133,"watchers":293,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/583"},"html":{"href":"https://github.com/openseadragon/openseadragon/pull/583"},"issue":{"href":"https://api.github.com/repos/openseadragon/openseadragon/issues/583"},"comments":{"href":"https://api.github.com/repos/openseadragon/openseadragon/issues/583/comments"},"review_comments":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/583/comments"},"review_comment":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/583/commits"},"statuses":{"href":"https://api.github.com/repos/openseadragon/openseadragon/statuses/3402d33088b067eea6cc9ddc379df2fadf855a53"}}}}