{"action":"created","comment":{"url":"https://api.github.com/repos/biocore/emperor/pulls/comments/78254159","id":78254159,"diff_hunk":"@@ -431,14 +445,76 @@ define([\n    */\n   EmperorController.prototype.screenshot = function(type) {\n     type = type || 'png';\n-    // Render all scenes so it's rendered in same context as save\n-    for (var i = 0; i < this.sceneViews.length; i++) {\n-      this.sceneViews[i].render();\n+\n+    if (type === 'png') {\n+      // Render all scenes so it's rendered in same context as save\n+      for (var i = 0; i < this.sceneViews.length; i++) {\n+        this.sceneViews[i].render();\n+      }\n+      var c = this.renderer.domElement.toDataURL('image/' + type);\n+      // Create DOM-less download link and click it to start download\n+      var download = $('<a href=\"' + c + '\" download=\"emperor.' + type + '\">');\n+      download.get(0).click();\n+    } else if (type === 'svg') {\n+      // confirm box based on number of samples: better safe than sorry\n+      if (this.dm.length >= 9000) {\n+        if (confirm('This number of samples could take a long time and in ' +\n+           'some computers the browser will crash. If this happens we ' +\n+           'suggest to lower the number of segments or use the png ' +\n+           'implementation. Do you want to continue?') == false) {\n+              return;","path":"emperor/support_files/js/controller.js","position":72,"original_position":72,"commit_id":"88cfe6152e3e8ccc9be41b3d95673f17dee77123","original_commit_id":"88cfe6152e3e8ccc9be41b3d95673f17dee77123","user":{"login":"ElDeveloper","id":375307,"avatar_url":"https://avatars.githubusercontent.com/u/375307?v=3","gravatar_id":"","url":"https://api.github.com/users/ElDeveloper","html_url":"https://github.com/ElDeveloper","followers_url":"https://api.github.com/users/ElDeveloper/followers","following_url":"https://api.github.com/users/ElDeveloper/following{/other_user}","gists_url":"https://api.github.com/users/ElDeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/ElDeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElDeveloper/subscriptions","organizations_url":"https://api.github.com/users/ElDeveloper/orgs","repos_url":"https://api.github.com/users/ElDeveloper/repos","events_url":"https://api.github.com/users/ElDeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/ElDeveloper/received_events","type":"User","site_admin":false},"body":"I think this line is over-indented, can you bring it back a few spaces?","created_at":"2016-09-09T21:45:44Z","updated_at":"2016-09-09T21:45:44Z","html_url":"https://github.com/biocore/emperor/pull/533#discussion_r78254159","pull_request_url":"https://api.github.com/repos/biocore/emperor/pulls/533","_links":{"self":{"href":"https://api.github.com/repos/biocore/emperor/pulls/comments/78254159"},"html":{"href":"https://github.com/biocore/emperor/pull/533#discussion_r78254159"},"pull_request":{"href":"https://api.github.com/repos/biocore/emperor/pulls/533"}}},"pull_request":{"url":"https://api.github.com/repos/biocore/emperor/pulls/533","id":84208582,"html_url":"https://github.com/biocore/emperor/pull/533","diff_url":"https://github.com/biocore/emperor/pull/533.diff","patch_url":"https://github.com/biocore/emperor/pull/533.patch","issue_url":"https://api.github.com/repos/biocore/emperor/issues/533","number":533,"state":"open","locked":false,"title":"generating SVG","user":{"login":"antgonza","id":2014559,"avatar_url":"https://avatars.githubusercontent.com/u/2014559?v=3","gravatar_id":"","url":"https://api.github.com/users/antgonza","html_url":"https://github.com/antgonza","followers_url":"https://api.github.com/users/antgonza/followers","following_url":"https://api.github.com/users/antgonza/following{/other_user}","gists_url":"https://api.github.com/users/antgonza/gists{/gist_id}","starred_url":"https://api.github.com/users/antgonza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antgonza/subscriptions","organizations_url":"https://api.github.com/users/antgonza/orgs","repos_url":"https://api.github.com/users/antgonza/repos","events_url":"https://api.github.com/users/antgonza/events{/privacy}","received_events_url":"https://api.github.com/users/antgonza/received_events","type":"User","site_admin":false},"body":"Missing:\r\n- [x] Fix labels issues\r\n- [x] Do tests pass?  ","created_at":"2016-09-06T22:38:11Z","updated_at":"2016-09-09T21:45:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a1faf1f250c81c69c105d9488ebccaeeae480a70","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/biocore/emperor/pulls/533/commits","review_comments_url":"https://api.github.com/repos/biocore/emperor/pulls/533/comments","review_comment_url":"https://api.github.com/repos/biocore/emperor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biocore/emperor/issues/533/comments","statuses_url":"https://api.github.com/repos/biocore/emperor/statuses/88cfe6152e3e8ccc9be41b3d95673f17dee77123","head":{"label":"antgonza:adding-svg","ref":"adding-svg","sha":"88cfe6152e3e8ccc9be41b3d95673f17dee77123","user":{"login":"antgonza","id":2014559,"avatar_url":"https://avatars.githubusercontent.com/u/2014559?v=3","gravatar_id":"","url":"https://api.github.com/users/antgonza","html_url":"https://github.com/antgonza","followers_url":"https://api.github.com/users/antgonza/followers","following_url":"https://api.github.com/users/antgonza/following{/other_user}","gists_url":"https://api.github.com/users/antgonza/gists{/gist_id}","starred_url":"https://api.github.com/users/antgonza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antgonza/subscriptions","organizations_url":"https://api.github.com/users/antgonza/orgs","repos_url":"https://api.github.com/users/antgonza/repos","events_url":"https://api.github.com/users/antgonza/events{/privacy}","received_events_url":"https://api.github.com/users/antgonza/received_events","type":"User","site_admin":false},"repo":{"id":7916019,"name":"emperor","full_name":"antgonza/emperor","owner":{"login":"antgonza","id":2014559,"avatar_url":"https://avatars.githubusercontent.com/u/2014559?v=3","gravatar_id":"","url":"https://api.github.com/users/antgonza","html_url":"https://github.com/antgonza","followers_url":"https://api.github.com/users/antgonza/followers","following_url":"https://api.github.com/users/antgonza/following{/other_user}","gists_url":"https://api.github.com/users/antgonza/gists{/gist_id}","starred_url":"https://api.github.com/users/antgonza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antgonza/subscriptions","organizations_url":"https://api.github.com/users/antgonza/orgs","repos_url":"https://api.github.com/users/antgonza/repos","events_url":"https://api.github.com/users/antgonza/events{/privacy}","received_events_url":"https://api.github.com/users/antgonza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/antgonza/emperor","description":"","fork":true,"url":"https://api.github.com/repos/antgonza/emperor","forks_url":"https://api.github.com/repos/antgonza/emperor/forks","keys_url":"https://api.github.com/repos/antgonza/emperor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antgonza/emperor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antgonza/emperor/teams","hooks_url":"https://api.github.com/repos/antgonza/emperor/hooks","issue_events_url":"https://api.github.com/repos/antgonza/emperor/issues/events{/number}","events_url":"https://api.github.com/repos/antgonza/emperor/events","assignees_url":"https://api.github.com/repos/antgonza/emperor/assignees{/user}","branches_url":"https://api.github.com/repos/antgonza/emperor/branches{/branch}","tags_url":"https://api.github.com/repos/antgonza/emperor/tags","blobs_url":"https://api.github.com/repos/antgonza/emperor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antgonza/emperor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antgonza/emperor/git/refs{/sha}","trees_url":"https://api.github.com/repos/antgonza/emperor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antgonza/emperor/statuses/{sha}","languages_url":"https://api.github.com/repos/antgonza/emperor/languages","stargazers_url":"https://api.github.com/repos/antgonza/emperor/stargazers","contributors_url":"https://api.github.com/repos/antgonza/emperor/contributors","subscribers_url":"https://api.github.com/repos/antgonza/emperor/subscribers","subscription_url":"https://api.github.com/repos/antgonza/emperor/subscription","commits_url":"https://api.github.com/repos/antgonza/emperor/commits{/sha}","git_commits_url":"https://api.github.com/repos/antgonza/emperor/git/commits{/sha}","comments_url":"https://api.github.com/repos/antgonza/emperor/comments{/number}","issue_comment_url":"https://api.github.com/repos/antgonza/emperor/issues/comments{/number}","contents_url":"https://api.github.com/repos/antgonza/emperor/contents/{+path}","compare_url":"https://api.github.com/repos/antgonza/emperor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antgonza/emperor/merges","archive_url":"https://api.github.com/repos/antgonza/emperor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antgonza/emperor/downloads","issues_url":"https://api.github.com/repos/antgonza/emperor/issues{/number}","pulls_url":"https://api.github.com/repos/antgonza/emperor/pulls{/number}","milestones_url":"https://api.github.com/repos/antgonza/emperor/milestones{/number}","notifications_url":"https://api.github.com/repos/antgonza/emperor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antgonza/emperor/labels{/name}","releases_url":"https://api.github.com/repos/antgonza/emperor/releases{/id}","deployments_url":"https://api.github.com/repos/antgonza/emperor/deployments","created_at":"2013-01-30T14:26:00Z","updated_at":"2015-04-03T13:21:04Z","pushed_at":"2016-09-09T06:56:29Z","git_url":"git://github.com/antgonza/emperor.git","ssh_url":"git@github.com:antgonza/emperor.git","clone_url":"https://github.com/antgonza/emperor.git","svn_url":"https://github.com/antgonza/emperor","homepage":null,"size":25827,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"biocore:new-api","ref":"new-api","sha":"983611702e116fcfe8a01dccc24d29b0eb7cf0d8","user":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?v=3","gravatar_id":"","url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"repo":{"id":7758329,"name":"emperor","full_name":"biocore/emperor","owner":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?v=3","gravatar_id":"","url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biocore/emperor","description":"Emperor a tool for the analysis and visualization of large microbial ecology datasets","fork":false,"url":"https://api.github.com/repos/biocore/emperor","forks_url":"https://api.github.com/repos/biocore/emperor/forks","keys_url":"https://api.github.com/repos/biocore/emperor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biocore/emperor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biocore/emperor/teams","hooks_url":"https://api.github.com/repos/biocore/emperor/hooks","issue_events_url":"https://api.github.com/repos/biocore/emperor/issues/events{/number}","events_url":"https://api.github.com/repos/biocore/emperor/events","assignees_url":"https://api.github.com/repos/biocore/emperor/assignees{/user}","branches_url":"https://api.github.com/repos/biocore/emperor/branches{/branch}","tags_url":"https://api.github.com/repos/biocore/emperor/tags","blobs_url":"https://api.github.com/repos/biocore/emperor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biocore/emperor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biocore/emperor/git/refs{/sha}","trees_url":"https://api.github.com/repos/biocore/emperor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biocore/emperor/statuses/{sha}","languages_url":"https://api.github.com/repos/biocore/emperor/languages","stargazers_url":"https://api.github.com/repos/biocore/emperor/stargazers","contributors_url":"https://api.github.com/repos/biocore/emperor/contributors","subscribers_url":"https://api.github.com/repos/biocore/emperor/subscribers","subscription_url":"https://api.github.com/repos/biocore/emperor/subscription","commits_url":"https://api.github.com/repos/biocore/emperor/commits{/sha}","git_commits_url":"https://api.github.com/repos/biocore/emperor/git/commits{/sha}","comments_url":"https://api.github.com/repos/biocore/emperor/comments{/number}","issue_comment_url":"https://api.github.com/repos/biocore/emperor/issues/comments{/number}","contents_url":"https://api.github.com/repos/biocore/emperor/contents/{+path}","compare_url":"https://api.github.com/repos/biocore/emperor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biocore/emperor/merges","archive_url":"https://api.github.com/repos/biocore/emperor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biocore/emperor/downloads","issues_url":"https://api.github.com/repos/biocore/emperor/issues{/number}","pulls_url":"https://api.github.com/repos/biocore/emperor/pulls{/number}","milestones_url":"https://api.github.com/repos/biocore/emperor/milestones{/number}","notifications_url":"https://api.github.com/repos/biocore/emperor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biocore/emperor/labels{/name}","releases_url":"https://api.github.com/repos/biocore/emperor/releases{/id}","deployments_url":"https://api.github.com/repos/biocore/emperor/deployments","created_at":"2013-01-22T18:27:18Z","updated_at":"2016-07-27T20:51:19Z","pushed_at":"2016-09-09T06:56:29Z","git_url":"git://github.com/biocore/emperor.git","ssh_url":"git@github.com:biocore/emperor.git","clone_url":"https://github.com/biocore/emperor.git","svn_url":"https://github.com/biocore/emperor","homepage":"http://emperor.microbio.me/uno","size":26650,"stargazers_count":36,"watchers_count":36,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":29,"mirror_url":null,"open_issues_count":89,"forks":29,"open_issues":89,"watchers":36,"default_branch":"new-api"}},"_links":{"self":{"href":"https://api.github.com/repos/biocore/emperor/pulls/533"},"html":{"href":"https://github.com/biocore/emperor/pull/533"},"issue":{"href":"https://api.github.com/repos/biocore/emperor/issues/533"},"comments":{"href":"https://api.github.com/repos/biocore/emperor/issues/533/comments"},"review_comments":{"href":"https://api.github.com/repos/biocore/emperor/pulls/533/comments"},"review_comment":{"href":"https://api.github.com/repos/biocore/emperor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biocore/emperor/pulls/533/commits"},"statuses":{"href":"https://api.github.com/repos/biocore/emperor/statuses/88cfe6152e3e8ccc9be41b3d95673f17dee77123"}}}}
{"actor":{"display_login":"ElDeveloper"}}