{"action":"created","comment":{"url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/comments/53978427","id":53978427,"diff_hunk":"@@ -0,0 +1,97 @@\n+(function( $ ){\n+\n+  /**\n+   * @class ZoomifyTileSource\n+   * @classdesc A tilesource implementation for the zoomify format.\n+   *\n+   * @memberof OpenSeadragon\n+   * @extends OpenSeadragon.TileSource\n+   * @param {Number} width - the pixel width of the image.\n+   * @param {Number} height\n+   * @param {Number} tileSize\n+   * @param {String} tilesUrl\n+   */\n+  $.ZoomifyTileSource = function( options ) {\n+\n+  \toptions.tileSize = 256;\n+\t\t\n+\t\tvar currentImageSize = {x:options.width,y:options.height};\n+\t\toptions.imageSizes = [{x:options.width,y:options.height}];\n+  \toptions.gridSize = [this._getGridSize(options.width,options.height,options.tileSize)];\n+\t\t\n+  \twhile(parseInt(currentImageSize.x) > options.tileSize || parseInt(currentImageSize.y) > options.tileSize) {\n+\t\t\t\tcurrentImageSize.x = Math.floor(currentImageSize.x/2);\n+\t\t\t\tcurrentImageSize.y = Math.floor(currentImageSize.y/2);\n+\t\t\t\toptions.imageSizes.push({x:currentImageSize.x,y:currentImageSize.y});\n+\t\t\t\toptions.gridSize.push(this._getGridSize(currentImageSize.x,currentImageSize.y,options.tileSize));\n+\t\t\t}\n+\t\toptions.imageSizes.reverse();\n+\t\toptions.gridSize.reverse();\n+\t\toptions.minLevel = 0;\n+\t\toptions.maxLevel = options.gridSize.length-1;\n+\t\t\n+  \t\n+  \tOpenSeadragon.TileSource.apply( this, [ options ] );","path":"src/zoomifytilesource.js","position":34,"original_position":34,"commit_id":"48eee7e75cdaf2108ddf123304ef46b460a6b78c","original_commit_id":"48eee7e75cdaf2108ddf123304ef46b460a6b78c","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":"Kill the spaces inside the square brackets too. ","created_at":"2016-02-24T17:57:39Z","updated_at":"2016-02-24T17:57:39Z","html_url":"https://github.com/openseadragon/openseadragon/pull/863#discussion_r53978427","pull_request_url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/863","_links":{"self":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/comments/53978427"},"html":{"href":"https://github.com/openseadragon/openseadragon/pull/863#discussion_r53978427"},"pull_request":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/863"}}},"pull_request":{"url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/863","id":60471575,"html_url":"https://github.com/openseadragon/openseadragon/pull/863","diff_url":"https://github.com/openseadragon/openseadragon/pull/863.diff","patch_url":"https://github.com/openseadragon/openseadragon/pull/863.patch","issue_url":"https://api.github.com/repos/openseadragon/openseadragon/issues/863","number":863,"state":"open","locked":false,"title":"Added first version of zoomifytilesource.js","user":{"login":"foobarable","id":893335,"avatar_url":"https://avatars.githubusercontent.com/u/893335?v=3","gravatar_id":"","url":"https://api.github.com/users/foobarable","html_url":"https://github.com/foobarable","followers_url":"https://api.github.com/users/foobarable/followers","following_url":"https://api.github.com/users/foobarable/following{/other_user}","gists_url":"https://api.github.com/users/foobarable/gists{/gist_id}","starred_url":"https://api.github.com/users/foobarable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foobarable/subscriptions","organizations_url":"https://api.github.com/users/foobarable/orgs","repos_url":"https://api.github.com/users/foobarable/repos","events_url":"https://api.github.com/users/foobarable/events{/privacy}","received_events_url":"https://api.github.com/users/foobarable/received_events","type":"User","site_admin":false},"body":"Hi, I would apprechiate some comments about coding style and if it's okay to implement my private functions like this","created_at":"2016-02-24T08:17:54Z","updated_at":"2016-02-24T17:57:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7a119f0a08e1485d64391ed7e7e2c2da010ce22","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/863/commits","review_comments_url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/863/comments","review_comment_url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openseadragon/openseadragon/issues/863/comments","statuses_url":"https://api.github.com/repos/openseadragon/openseadragon/statuses/48eee7e75cdaf2108ddf123304ef46b460a6b78c","head":{"label":"foobarable:master","ref":"master","sha":"48eee7e75cdaf2108ddf123304ef46b460a6b78c","user":{"login":"foobarable","id":893335,"avatar_url":"https://avatars.githubusercontent.com/u/893335?v=3","gravatar_id":"","url":"https://api.github.com/users/foobarable","html_url":"https://github.com/foobarable","followers_url":"https://api.github.com/users/foobarable/followers","following_url":"https://api.github.com/users/foobarable/following{/other_user}","gists_url":"https://api.github.com/users/foobarable/gists{/gist_id}","starred_url":"https://api.github.com/users/foobarable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foobarable/subscriptions","organizations_url":"https://api.github.com/users/foobarable/orgs","repos_url":"https://api.github.com/users/foobarable/repos","events_url":"https://api.github.com/users/foobarable/events{/privacy}","received_events_url":"https://api.github.com/users/foobarable/received_events","type":"User","site_admin":false},"repo":{"id":52425667,"name":"openseadragon","full_name":"foobarable/openseadragon","owner":{"login":"foobarable","id":893335,"avatar_url":"https://avatars.githubusercontent.com/u/893335?v=3","gravatar_id":"","url":"https://api.github.com/users/foobarable","html_url":"https://github.com/foobarable","followers_url":"https://api.github.com/users/foobarable/followers","following_url":"https://api.github.com/users/foobarable/following{/other_user}","gists_url":"https://api.github.com/users/foobarable/gists{/gist_id}","starred_url":"https://api.github.com/users/foobarable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foobarable/subscriptions","organizations_url":"https://api.github.com/users/foobarable/orgs","repos_url":"https://api.github.com/users/foobarable/repos","events_url":"https://api.github.com/users/foobarable/events{/privacy}","received_events_url":"https://api.github.com/users/foobarable/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/foobarable/openseadragon","description":"An open-source, web-based viewer for zoomable images, implemented in pure JavaScript. ","fork":true,"url":"https://api.github.com/repos/foobarable/openseadragon","forks_url":"https://api.github.com/repos/foobarable/openseadragon/forks","keys_url":"https://api.github.com/repos/foobarable/openseadragon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/foobarable/openseadragon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/foobarable/openseadragon/teams","hooks_url":"https://api.github.com/repos/foobarable/openseadragon/hooks","issue_events_url":"https://api.github.com/repos/foobarable/openseadragon/issues/events{/number}","events_url":"https://api.github.com/repos/foobarable/openseadragon/events","assignees_url":"https://api.github.com/repos/foobarable/openseadragon/assignees{/user}","branches_url":"https://api.github.com/repos/foobarable/openseadragon/branches{/branch}","tags_url":"https://api.github.com/repos/foobarable/openseadragon/tags","blobs_url":"https://api.github.com/repos/foobarable/openseadragon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/foobarable/openseadragon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/foobarable/openseadragon/git/refs{/sha}","trees_url":"https://api.github.com/repos/foobarable/openseadragon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/foobarable/openseadragon/statuses/{sha}","languages_url":"https://api.github.com/repos/foobarable/openseadragon/languages","stargazers_url":"https://api.github.com/repos/foobarable/openseadragon/stargazers","contributors_url":"https://api.github.com/repos/foobarable/openseadragon/contributors","subscribers_url":"https://api.github.com/repos/foobarable/openseadragon/subscribers","subscription_url":"https://api.github.com/repos/foobarable/openseadragon/subscription","commits_url":"https://api.github.com/repos/foobarable/openseadragon/commits{/sha}","git_commits_url":"https://api.github.com/repos/foobarable/openseadragon/git/commits{/sha}","comments_url":"https://api.github.com/repos/foobarable/openseadragon/comments{/number}","issue_comment_url":"https://api.github.com/repos/foobarable/openseadragon/issues/comments{/number}","contents_url":"https://api.github.com/repos/foobarable/openseadragon/contents/{+path}","compare_url":"https://api.github.com/repos/foobarable/openseadragon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/foobarable/openseadragon/merges","archive_url":"https://api.github.com/repos/foobarable/openseadragon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/foobarable/openseadragon/downloads","issues_url":"https://api.github.com/repos/foobarable/openseadragon/issues{/number}","pulls_url":"https://api.github.com/repos/foobarable/openseadragon/pulls{/number}","milestones_url":"https://api.github.com/repos/foobarable/openseadragon/milestones{/number}","notifications_url":"https://api.github.com/repos/foobarable/openseadragon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/foobarable/openseadragon/labels{/name}","releases_url":"https://api.github.com/repos/foobarable/openseadragon/releases{/id}","deployments_url":"https://api.github.com/repos/foobarable/openseadragon/deployments","created_at":"2016-02-24T08:14:44Z","updated_at":"2016-02-24T08:14:45Z","pushed_at":"2016-02-24T08:16:32Z","git_url":"git://github.com/foobarable/openseadragon.git","ssh_url":"git@github.com:foobarable/openseadragon.git","clone_url":"https://github.com/foobarable/openseadragon.git","svn_url":"https://github.com/foobarable/openseadragon","homepage":"http://openseadragon.github.io/","size":11485,"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:master","ref":"master","sha":"71f93a27cd08d247370178e906bcfa4d73e545be","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}","deployments_url":"https://api.github.com/repos/openseadragon/openseadragon/deployments","created_at":"2013-01-31T17:44:24Z","updated_at":"2016-02-24T15:09:51Z","pushed_at":"2016-02-24T17:27:40Z","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":11928,"stargazers_count":871,"watchers_count":871,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":197,"mirror_url":null,"open_issues_count":184,"forks":197,"open_issues":184,"watchers":871,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/863"},"html":{"href":"https://github.com/openseadragon/openseadragon/pull/863"},"issue":{"href":"https://api.github.com/repos/openseadragon/openseadragon/issues/863"},"comments":{"href":"https://api.github.com/repos/openseadragon/openseadragon/issues/863/comments"},"review_comments":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/863/comments"},"review_comment":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/863/commits"},"statuses":{"href":"https://api.github.com/repos/openseadragon/openseadragon/statuses/48eee7e75cdaf2108ddf123304ef46b460a6b78c"}}}}