{"action":"created","comment":{"url":"https://api.github.com/repos/biocore/emperor/pulls/comments/61829749","id":61829749,"diff_hunk":"@@ -302,6 +331,61 @@ define([\n \n   /**\n    *\n+   * Write save file for the current controller settings\n+   *\n+   **/\n+   EmperorController.prototype.saveConfig = function() {\n+    var saveinfo = {};\n+    // Assuming single sceneview for now\n+    sceneview = this.sceneViews[0];\n+    saveinfo.cameraPos = sceneview.camera.position;\n+    saveinfo.cameraQuat = sceneview.camera.quaternion;\n+    //Save settings for each controller in the view\n+     _.each(this.controllers, function(controller, index) {\n+      if (controller === undefined) {\n+        return;\n+      }\n+      saveinfo[index] = controller.toJSON();\n+    });\n+\n+    //save the file\n+    var blob = new Blob([JSON.stringify(saveinfo)], {type: \"text/plain;charset=utf-8\"});\n+    saveAs(blob, \"Emperor Settings.txt\");","path":"emperor/support_files/js/controller.js","position":79,"original_position":79,"commit_id":"8c43ce45e9e5ab5b86574f7bb97dd4257117935e","original_commit_id":"8c43ce45e9e5ab5b86574f7bb97dd4257117935e","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":"What about `'emperor-settings.json'`?","created_at":"2016-05-03T01:21:08Z","updated_at":"2016-05-03T01:21:08Z","html_url":"https://github.com/biocore/emperor/pull/466#discussion_r61829749","pull_request_url":"https://api.github.com/repos/biocore/emperor/pulls/466","_links":{"self":{"href":"https://api.github.com/repos/biocore/emperor/pulls/comments/61829749"},"html":{"href":"https://github.com/biocore/emperor/pull/466#discussion_r61829749"},"pull_request":{"href":"https://api.github.com/repos/biocore/emperor/pulls/466"}}},"pull_request":{"url":"https://api.github.com/repos/biocore/emperor/pulls/466","id":68323132,"html_url":"https://github.com/biocore/emperor/pull/466","diff_url":"https://github.com/biocore/emperor/pull/466.diff","patch_url":"https://github.com/biocore/emperor/pull/466.patch","issue_url":"https://api.github.com/repos/biocore/emperor/issues/466","number":466,"state":"open","locked":false,"title":"Save controller and camera settings","user":{"login":"squirrelo","id":3079066,"avatar_url":"https://avatars.githubusercontent.com/u/3079066?v=3","gravatar_id":"","url":"https://api.github.com/users/squirrelo","html_url":"https://github.com/squirrelo","followers_url":"https://api.github.com/users/squirrelo/followers","following_url":"https://api.github.com/users/squirrelo/following{/other_user}","gists_url":"https://api.github.com/users/squirrelo/gists{/gist_id}","starred_url":"https://api.github.com/users/squirrelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squirrelo/subscriptions","organizations_url":"https://api.github.com/users/squirrelo/orgs","repos_url":"https://api.github.com/users/squirrelo/repos","events_url":"https://api.github.com/users/squirrelo/events{/privacy}","received_events_url":"https://api.github.com/users/squirrelo/received_events","type":"User","site_admin":false},"body":"This adds the ability to save and load the current state of emperor.\r\n\r\n~~Requires #465~~","created_at":"2016-04-29T04:18:40Z","updated_at":"2016-05-03T01:21:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"58ac10afeecaa5b8f594cf98fd692fe4773cbd01","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/biocore/emperor/pulls/466/commits","review_comments_url":"https://api.github.com/repos/biocore/emperor/pulls/466/comments","review_comment_url":"https://api.github.com/repos/biocore/emperor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biocore/emperor/issues/466/comments","statuses_url":"https://api.github.com/repos/biocore/emperor/statuses/8c43ce45e9e5ab5b86574f7bb97dd4257117935e","head":{"label":"squirrelo:save-context","ref":"save-context","sha":"8c43ce45e9e5ab5b86574f7bb97dd4257117935e","user":{"login":"squirrelo","id":3079066,"avatar_url":"https://avatars.githubusercontent.com/u/3079066?v=3","gravatar_id":"","url":"https://api.github.com/users/squirrelo","html_url":"https://github.com/squirrelo","followers_url":"https://api.github.com/users/squirrelo/followers","following_url":"https://api.github.com/users/squirrelo/following{/other_user}","gists_url":"https://api.github.com/users/squirrelo/gists{/gist_id}","starred_url":"https://api.github.com/users/squirrelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squirrelo/subscriptions","organizations_url":"https://api.github.com/users/squirrelo/orgs","repos_url":"https://api.github.com/users/squirrelo/repos","events_url":"https://api.github.com/users/squirrelo/events{/privacy}","received_events_url":"https://api.github.com/users/squirrelo/received_events","type":"User","site_admin":false},"repo":{"id":56338855,"name":"emperor","full_name":"squirrelo/emperor","owner":{"login":"squirrelo","id":3079066,"avatar_url":"https://avatars.githubusercontent.com/u/3079066?v=3","gravatar_id":"","url":"https://api.github.com/users/squirrelo","html_url":"https://github.com/squirrelo","followers_url":"https://api.github.com/users/squirrelo/followers","following_url":"https://api.github.com/users/squirrelo/following{/other_user}","gists_url":"https://api.github.com/users/squirrelo/gists{/gist_id}","starred_url":"https://api.github.com/users/squirrelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squirrelo/subscriptions","organizations_url":"https://api.github.com/users/squirrelo/orgs","repos_url":"https://api.github.com/users/squirrelo/repos","events_url":"https://api.github.com/users/squirrelo/events{/privacy}","received_events_url":"https://api.github.com/users/squirrelo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/squirrelo/emperor","description":"Emperor a tool for the analysis and visualization of large microbial ecology datasets","fork":true,"url":"https://api.github.com/repos/squirrelo/emperor","forks_url":"https://api.github.com/repos/squirrelo/emperor/forks","keys_url":"https://api.github.com/repos/squirrelo/emperor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/squirrelo/emperor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/squirrelo/emperor/teams","hooks_url":"https://api.github.com/repos/squirrelo/emperor/hooks","issue_events_url":"https://api.github.com/repos/squirrelo/emperor/issues/events{/number}","events_url":"https://api.github.com/repos/squirrelo/emperor/events","assignees_url":"https://api.github.com/repos/squirrelo/emperor/assignees{/user}","branches_url":"https://api.github.com/repos/squirrelo/emperor/branches{/branch}","tags_url":"https://api.github.com/repos/squirrelo/emperor/tags","blobs_url":"https://api.github.com/repos/squirrelo/emperor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/squirrelo/emperor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/squirrelo/emperor/git/refs{/sha}","trees_url":"https://api.github.com/repos/squirrelo/emperor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/squirrelo/emperor/statuses/{sha}","languages_url":"https://api.github.com/repos/squirrelo/emperor/languages","stargazers_url":"https://api.github.com/repos/squirrelo/emperor/stargazers","contributors_url":"https://api.github.com/repos/squirrelo/emperor/contributors","subscribers_url":"https://api.github.com/repos/squirrelo/emperor/subscribers","subscription_url":"https://api.github.com/repos/squirrelo/emperor/subscription","commits_url":"https://api.github.com/repos/squirrelo/emperor/commits{/sha}","git_commits_url":"https://api.github.com/repos/squirrelo/emperor/git/commits{/sha}","comments_url":"https://api.github.com/repos/squirrelo/emperor/comments{/number}","issue_comment_url":"https://api.github.com/repos/squirrelo/emperor/issues/comments{/number}","contents_url":"https://api.github.com/repos/squirrelo/emperor/contents/{+path}","compare_url":"https://api.github.com/repos/squirrelo/emperor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/squirrelo/emperor/merges","archive_url":"https://api.github.com/repos/squirrelo/emperor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/squirrelo/emperor/downloads","issues_url":"https://api.github.com/repos/squirrelo/emperor/issues{/number}","pulls_url":"https://api.github.com/repos/squirrelo/emperor/pulls{/number}","milestones_url":"https://api.github.com/repos/squirrelo/emperor/milestones{/number}","notifications_url":"https://api.github.com/repos/squirrelo/emperor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/squirrelo/emperor/labels{/name}","releases_url":"https://api.github.com/repos/squirrelo/emperor/releases{/id}","deployments_url":"https://api.github.com/repos/squirrelo/emperor/deployments","created_at":"2016-04-15T17:41:56Z","updated_at":"2016-04-15T17:41:57Z","pushed_at":"2016-05-03T00:52:38Z","git_url":"git://github.com/squirrelo/emperor.git","ssh_url":"git@github.com:squirrelo/emperor.git","clone_url":"https://github.com/squirrelo/emperor.git","svn_url":"https://github.com/squirrelo/emperor","homepage":"http://emperor.microbio.me","size":9930,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"biocore:new-api","ref":"new-api","sha":"f15dd61858a50aaf51b08c86f73f82027aa41e23","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-04-27T04:04:49Z","pushed_at":"2016-05-03T00:52:39Z","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","size":10084,"stargazers_count":32,"watchers_count":32,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":25,"mirror_url":null,"open_issues_count":84,"forks":25,"open_issues":84,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biocore/emperor/pulls/466"},"html":{"href":"https://github.com/biocore/emperor/pull/466"},"issue":{"href":"https://api.github.com/repos/biocore/emperor/issues/466"},"comments":{"href":"https://api.github.com/repos/biocore/emperor/issues/466/comments"},"review_comments":{"href":"https://api.github.com/repos/biocore/emperor/pulls/466/comments"},"review_comment":{"href":"https://api.github.com/repos/biocore/emperor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biocore/emperor/pulls/466/commits"},"statuses":{"href":"https://api.github.com/repos/biocore/emperor/statuses/8c43ce45e9e5ab5b86574f7bb97dd4257117935e"}}}}