{"action":"created","comment":{"url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/comments/86432656","pull_request_review_id":7093260,"id":86432656,"diff_hunk":"@@ -187,6 +187,9 @@\n   * @property {Number} [opacity=1]\n   *     Default opacity of the tiled images (1=opaque, 0=transparent)\n   *\n+  * @property {Boolean} [preload=false]\n+  *     If true, tiles in image load without drawing. Defaults to false, so tiles are loaded and drawn.","path":"src/openseadragon.js","position":5,"original_position":5,"commit_id":"bac2cab8e948f54d24af09e5be94712dacca8daa","original_commit_id":"bac2cab8e948f54d24af09e5be94712dacca8daa","user":{"login":"thejohnhoffer","id":9781588,"avatar_url":"https://avatars.githubusercontent.com/u/9781588?v=3","gravatar_id":"","url":"https://api.github.com/users/thejohnhoffer","html_url":"https://github.com/thejohnhoffer","followers_url":"https://api.github.com/users/thejohnhoffer/followers","following_url":"https://api.github.com/users/thejohnhoffer/following{/other_user}","gists_url":"https://api.github.com/users/thejohnhoffer/gists{/gist_id}","starred_url":"https://api.github.com/users/thejohnhoffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thejohnhoffer/subscriptions","organizations_url":"https://api.github.com/users/thejohnhoffer/orgs","repos_url":"https://api.github.com/users/thejohnhoffer/repos","events_url":"https://api.github.com/users/thejohnhoffer/events{/privacy}","received_events_url":"https://api.github.com/users/thejohnhoffer/received_events","type":"User","site_admin":false},"body":"I'm confused. Yes- `preload: true` will make the tiles not draw. That's the goal- if `preload==true`, the tiles won't draw until someone switches `preload==false`...\r\nThis was my intention:\r\n|                | `preload == true` | `preload == false` |\r\n|----------------|-------------------|--------------------|\r\n| `opacity == 0` | Do Nothing        | Do Nothing         |\r\n| `opacity > 0`  | Load only         | Load & Draw        |\r\n\r\nI think this is what you have in mind:\r\n|                | `preload == true` | `preload == false` |\r\n|----------------|-------------------|--------------------|\r\n| `opacity == 0` | Load only         | Do Nothing         |\r\n| `opacity > 0`  | Load only         | Load & Draw        |\r\n","created_at":"2016-11-03T20:12:13Z","updated_at":"2016-11-03T20:12:13Z","html_url":"https://github.com/openseadragon/openseadragon/pull/1071#discussion_r86432656","pull_request_url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/1071","_links":{"self":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/comments/86432656"},"html":{"href":"https://github.com/openseadragon/openseadragon/pull/1071#discussion_r86432656"},"pull_request":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/1071"}}},"pull_request":{"url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/1071","id":92086584,"html_url":"https://github.com/openseadragon/openseadragon/pull/1071","diff_url":"https://github.com/openseadragon/openseadragon/pull/1071.diff","patch_url":"https://github.com/openseadragon/openseadragon/pull/1071.patch","issue_url":"https://api.github.com/repos/openseadragon/openseadragon/issues/1071","number":1071,"state":"open","locked":false,"title":"tiledImage.preload","user":{"login":"thejohnhoffer","id":9781588,"avatar_url":"https://avatars.githubusercontent.com/u/9781588?v=3","gravatar_id":"","url":"https://api.github.com/users/thejohnhoffer","html_url":"https://github.com/thejohnhoffer","followers_url":"https://api.github.com/users/thejohnhoffer/followers","following_url":"https://api.github.com/users/thejohnhoffer/following{/other_user}","gists_url":"https://api.github.com/users/thejohnhoffer/gists{/gist_id}","starred_url":"https://api.github.com/users/thejohnhoffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thejohnhoffer/subscriptions","organizations_url":"https://api.github.com/users/thejohnhoffer/orgs","repos_url":"https://api.github.com/users/thejohnhoffer/repos","events_url":"https://api.github.com/users/thejohnhoffer/events{/privacy}","received_events_url":"https://api.github.com/users/thejohnhoffer/received_events","type":"User","site_admin":false},"body":"Happily, there have been requests for the [ability to preload a `tiledImage`](https://github.com/openseadragon/openseadragon/issues/821) without drawing the tiles to the canvas. Preloading a totally hidden `tiledImage` makes for faster browsing through more than one `tileSource`. This is done by setting `tiledImage.preload` to `true`.\r\n\r\nWithout this enhancement, setting `tiledImage.opacity` to a small fraction (e.g. 0.001) can allow a sort of 'loading without showing.' For assumed performance and aesthetic reasons, I think it's better to have the explicit option `tiledImage.preload`.\r\n\r\nThis pull request allows `preload` to be sent an option to `viewer.addTiledImage`, set as a property by `tiledImage.setPreload()`, and read from `tiledImage.getPreload()`. A default `preload` option can be set when constructing a viewer directly or as a property of on object in the `tileSources` option.\r\n\r\nThe only actual function of `tiledImage.preload` [is right here](https://github.com/openseadragon/openseadragon/pull/1071/files#diff-80bee396a520b6fa750064722bc3f0ceR292): \r\n\r\n```\r\nif (this.opacity !== 0 && !this.preload) {\r\n    this._midDraw = true;\r\n    this._updateViewport();\r\n    this._midDraw = false;\r\n}\r\n```\r\n\r\nAs documented, `tiledImage.preload` defaults to `false`, because it would be a very silly world if the default setting for our viewer were to not view the images.\r\n","created_at":"2016-11-03T01:51:52Z","updated_at":"2016-11-03T20:12:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"46314d65ed7fd436dfd4f497973607dff5b1b5d7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/1071/commits","review_comments_url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/1071/comments","review_comment_url":"https://api.github.com/repos/openseadragon/openseadragon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openseadragon/openseadragon/issues/1071/comments","statuses_url":"https://api.github.com/repos/openseadragon/openseadragon/statuses/bac2cab8e948f54d24af09e5be94712dacca8daa","head":{"label":"thejohnhoffer:master","ref":"master","sha":"bac2cab8e948f54d24af09e5be94712dacca8daa","user":{"login":"thejohnhoffer","id":9781588,"avatar_url":"https://avatars.githubusercontent.com/u/9781588?v=3","gravatar_id":"","url":"https://api.github.com/users/thejohnhoffer","html_url":"https://github.com/thejohnhoffer","followers_url":"https://api.github.com/users/thejohnhoffer/followers","following_url":"https://api.github.com/users/thejohnhoffer/following{/other_user}","gists_url":"https://api.github.com/users/thejohnhoffer/gists{/gist_id}","starred_url":"https://api.github.com/users/thejohnhoffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thejohnhoffer/subscriptions","organizations_url":"https://api.github.com/users/thejohnhoffer/orgs","repos_url":"https://api.github.com/users/thejohnhoffer/repos","events_url":"https://api.github.com/users/thejohnhoffer/events{/privacy}","received_events_url":"https://api.github.com/users/thejohnhoffer/received_events","type":"User","site_admin":false},"repo":{"id":71473761,"name":"openseadragon","full_name":"thejohnhoffer/openseadragon","owner":{"login":"thejohnhoffer","id":9781588,"avatar_url":"https://avatars.githubusercontent.com/u/9781588?v=3","gravatar_id":"","url":"https://api.github.com/users/thejohnhoffer","html_url":"https://github.com/thejohnhoffer","followers_url":"https://api.github.com/users/thejohnhoffer/followers","following_url":"https://api.github.com/users/thejohnhoffer/following{/other_user}","gists_url":"https://api.github.com/users/thejohnhoffer/gists{/gist_id}","starred_url":"https://api.github.com/users/thejohnhoffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thejohnhoffer/subscriptions","organizations_url":"https://api.github.com/users/thejohnhoffer/orgs","repos_url":"https://api.github.com/users/thejohnhoffer/repos","events_url":"https://api.github.com/users/thejohnhoffer/events{/privacy}","received_events_url":"https://api.github.com/users/thejohnhoffer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thejohnhoffer/openseadragon","description":"An open-source, web-based viewer for zoomable images, implemented in pure JavaScript. ","fork":true,"url":"https://api.github.com/repos/thejohnhoffer/openseadragon","forks_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/forks","keys_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/teams","hooks_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/hooks","issue_events_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/issues/events{/number}","events_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/events","assignees_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/assignees{/user}","branches_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/branches{/branch}","tags_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/tags","blobs_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/git/refs{/sha}","trees_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/statuses/{sha}","languages_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/languages","stargazers_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/stargazers","contributors_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/contributors","subscribers_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/subscribers","subscription_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/subscription","commits_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/commits{/sha}","git_commits_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/git/commits{/sha}","comments_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/comments{/number}","issue_comment_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/issues/comments{/number}","contents_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/contents/{+path}","compare_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/merges","archive_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/downloads","issues_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/issues{/number}","pulls_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/pulls{/number}","milestones_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/milestones{/number}","notifications_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/labels{/name}","releases_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/releases{/id}","deployments_url":"https://api.github.com/repos/thejohnhoffer/openseadragon/deployments","created_at":"2016-10-20T14:54:00Z","updated_at":"2016-10-20T14:54:02Z","pushed_at":"2016-11-03T14:10:22Z","git_url":"git://github.com/thejohnhoffer/openseadragon.git","ssh_url":"git@github.com:thejohnhoffer/openseadragon.git","clone_url":"https://github.com/thejohnhoffer/openseadragon.git","svn_url":"https://github.com/thejohnhoffer/openseadragon","homepage":"http://openseadragon.github.io/","size":11987,"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":"e910e93dbf1bd33d7ab067f5ccfda880ce70850e","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-11-03T16:47:17Z","pushed_at":"2016-11-03T01:51:53Z","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":13582,"stargazers_count":1008,"watchers_count":1008,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":238,"mirror_url":null,"open_issues_count":279,"forks":238,"open_issues":279,"watchers":1008,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/1071"},"html":{"href":"https://github.com/openseadragon/openseadragon/pull/1071"},"issue":{"href":"https://api.github.com/repos/openseadragon/openseadragon/issues/1071"},"comments":{"href":"https://api.github.com/repos/openseadragon/openseadragon/issues/1071/comments"},"review_comments":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/1071/comments"},"review_comment":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openseadragon/openseadragon/pulls/1071/commits"},"statuses":{"href":"https://api.github.com/repos/openseadragon/openseadragon/statuses/bac2cab8e948f54d24af09e5be94712dacca8daa"}}}}
{"actor":{"display_login":"thejohnhoffer"}}