{"action":"created","comment":{"url":"https://api.github.com/repos/tdhock/animint/pulls/comments/32845090","id":32845090,"diff_hunk":"@@ -1458,9 +1458,34 @@ var animint = function (to_select, json_file) {\n \ts_info.selected.splice(i_value, 1);\n       }\n     }\n-    s_info.update.forEach(function(g_name){\n-      update_geom(g_name, v_name);\n-    });\n+    // the geom is passed in on(\"click\")\n+    // so if update_selector is passed by clicking...\n+    if(typeof geom != \"undefined\"){\n+      // loop through each aesthetic\n+      // this should be fixed - only loop through showSelected aesthetics\n+      Object.keys(geom.aes).forEach(function(entry) {\n+        // loop through each of the geoms to update\n+        // also should be fixed \n+        s_info.update.forEach(function(g_name){\n+          // for ones where it matches geom.classed, do next if statement\n+          if(g_name == geom.classed) {\n+            // only update the geom if there's a showSelected statement that doesn't come from the legend\n+            if(!/legend/.test(entry) && /showSelected/.test(entry)) {\n+              update_geom(g_name, v_name);\n+            }\n+          } else {\n+          // otherwise just update the geom as normal\n+            update_geom(g_name, v_name);\n+          }\n+        });\n+      });","path":"inst/htmljs/animint.js","position":45,"original_position":45,"commit_id":"d2723bdb4ed8aae31f3708ed5cb222dc86e529d9","original_commit_id":"d2723bdb4ed8aae31f3708ed5cb222dc86e529d9","user":{"login":"kferris10","id":6612411,"avatar_url":"https://avatars.githubusercontent.com/u/6612411?v=3","gravatar_id":"","url":"https://api.github.com/users/kferris10","html_url":"https://github.com/kferris10","followers_url":"https://api.github.com/users/kferris10/followers","following_url":"https://api.github.com/users/kferris10/following{/other_user}","gists_url":"https://api.github.com/users/kferris10/gists{/gist_id}","starred_url":"https://api.github.com/users/kferris10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kferris10/subscriptions","organizations_url":"https://api.github.com/users/kferris10/orgs","repos_url":"https://api.github.com/users/kferris10/repos","events_url":"https://api.github.com/users/kferris10/events{/privacy}","received_events_url":"https://api.github.com/users/kferris10/received_events","type":"User","site_admin":false},"body":"I'm sure that it could be much simpler.  With this example, I was just experimenting with a fix for this bug.","created_at":"2015-06-19T16:28:15Z","updated_at":"2015-06-19T16:28:15Z","html_url":"https://github.com/tdhock/animint/pull/74#discussion_r32845090","pull_request_url":"https://api.github.com/repos/tdhock/animint/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/tdhock/animint/pulls/comments/32845090"},"html":{"href":"https://github.com/tdhock/animint/pull/74#discussion_r32845090"},"pull_request":{"href":"https://api.github.com/repos/tdhock/animint/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/tdhock/animint/pulls/74","id":35978250,"html_url":"https://github.com/tdhock/animint/pull/74","diff_url":"https://github.com/tdhock/animint/pull/74.diff","patch_url":"https://github.com/tdhock/animint/pull/74.patch","issue_url":"https://api.github.com/repos/tdhock/animint/issues/74","number":74,"state":"open","locked":false,"title":"Getting started with interactive legends","user":{"login":"kferris10","id":6612411,"avatar_url":"https://avatars.githubusercontent.com/u/6612411?v=3","gravatar_id":"","url":"https://api.github.com/users/kferris10","html_url":"https://github.com/kferris10","followers_url":"https://api.github.com/users/kferris10/followers","following_url":"https://api.github.com/users/kferris10/following{/other_user}","gists_url":"https://api.github.com/users/kferris10/gists{/gist_id}","starred_url":"https://api.github.com/users/kferris10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kferris10/subscriptions","organizations_url":"https://api.github.com/users/kferris10/orgs","repos_url":"https://api.github.com/users/kferris10/repos","events_url":"https://api.github.com/users/kferris10/events{/privacy}","received_events_url":"https://api.github.com/users/kferris10/received_events","type":"User","site_admin":false},"body":"This is just a rough start to implementing interactive legends.  @cpsievert thought it would be good to discuss where exactly we want this to go.  He has a couple ideas which are slightly over my head so I'll let him explain.\r\n\r\nI've [put together a working example](http://kferris10.github.io/animint_dev/) so you can see the general idea.  I also explain the changes I've made there.  I'm pretty sure that this is the only example for which this will work. \r\n\r\nI'd also love any suggestions for tests that might be useful here.  Thanks!","created_at":"2015-05-21T21:13:12Z","updated_at":"2015-06-19T16:28:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f9125031b4ada95a8ace23d1cdff17340ce3d3ce","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tdhock/animint/pulls/74/commits","review_comments_url":"https://api.github.com/repos/tdhock/animint/pulls/74/comments","review_comment_url":"https://api.github.com/repos/tdhock/animint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tdhock/animint/issues/74/comments","statuses_url":"https://api.github.com/repos/tdhock/animint/statuses/d2723bdb4ed8aae31f3708ed5cb222dc86e529d9","head":{"label":"tdhock:interactive_legends","ref":"interactive_legends","sha":"d2723bdb4ed8aae31f3708ed5cb222dc86e529d9","user":{"login":"tdhock","id":932850,"avatar_url":"https://avatars.githubusercontent.com/u/932850?v=3","gravatar_id":"","url":"https://api.github.com/users/tdhock","html_url":"https://github.com/tdhock","followers_url":"https://api.github.com/users/tdhock/followers","following_url":"https://api.github.com/users/tdhock/following{/other_user}","gists_url":"https://api.github.com/users/tdhock/gists{/gist_id}","starred_url":"https://api.github.com/users/tdhock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdhock/subscriptions","organizations_url":"https://api.github.com/users/tdhock/orgs","repos_url":"https://api.github.com/users/tdhock/repos","events_url":"https://api.github.com/users/tdhock/events{/privacy}","received_events_url":"https://api.github.com/users/tdhock/received_events","type":"User","site_admin":false},"repo":{"id":8399379,"name":"animint","full_name":"tdhock/animint","owner":{"login":"tdhock","id":932850,"avatar_url":"https://avatars.githubusercontent.com/u/932850?v=3","gravatar_id":"","url":"https://api.github.com/users/tdhock","html_url":"https://github.com/tdhock","followers_url":"https://api.github.com/users/tdhock/followers","following_url":"https://api.github.com/users/tdhock/following{/other_user}","gists_url":"https://api.github.com/users/tdhock/gists{/gist_id}","starred_url":"https://api.github.com/users/tdhock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdhock/subscriptions","organizations_url":"https://api.github.com/users/tdhock/orgs","repos_url":"https://api.github.com/users/tdhock/repos","events_url":"https://api.github.com/users/tdhock/events{/privacy}","received_events_url":"https://api.github.com/users/tdhock/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tdhock/animint","description":"animated and interactive web graphics","fork":false,"url":"https://api.github.com/repos/tdhock/animint","forks_url":"https://api.github.com/repos/tdhock/animint/forks","keys_url":"https://api.github.com/repos/tdhock/animint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tdhock/animint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tdhock/animint/teams","hooks_url":"https://api.github.com/repos/tdhock/animint/hooks","issue_events_url":"https://api.github.com/repos/tdhock/animint/issues/events{/number}","events_url":"https://api.github.com/repos/tdhock/animint/events","assignees_url":"https://api.github.com/repos/tdhock/animint/assignees{/user}","branches_url":"https://api.github.com/repos/tdhock/animint/branches{/branch}","tags_url":"https://api.github.com/repos/tdhock/animint/tags","blobs_url":"https://api.github.com/repos/tdhock/animint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tdhock/animint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tdhock/animint/git/refs{/sha}","trees_url":"https://api.github.com/repos/tdhock/animint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tdhock/animint/statuses/{sha}","languages_url":"https://api.github.com/repos/tdhock/animint/languages","stargazers_url":"https://api.github.com/repos/tdhock/animint/stargazers","contributors_url":"https://api.github.com/repos/tdhock/animint/contributors","subscribers_url":"https://api.github.com/repos/tdhock/animint/subscribers","subscription_url":"https://api.github.com/repos/tdhock/animint/subscription","commits_url":"https://api.github.com/repos/tdhock/animint/commits{/sha}","git_commits_url":"https://api.github.com/repos/tdhock/animint/git/commits{/sha}","comments_url":"https://api.github.com/repos/tdhock/animint/comments{/number}","issue_comment_url":"https://api.github.com/repos/tdhock/animint/issues/comments{/number}","contents_url":"https://api.github.com/repos/tdhock/animint/contents/{+path}","compare_url":"https://api.github.com/repos/tdhock/animint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tdhock/animint/merges","archive_url":"https://api.github.com/repos/tdhock/animint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tdhock/animint/downloads","issues_url":"https://api.github.com/repos/tdhock/animint/issues{/number}","pulls_url":"https://api.github.com/repos/tdhock/animint/pulls{/number}","milestones_url":"https://api.github.com/repos/tdhock/animint/milestones{/number}","notifications_url":"https://api.github.com/repos/tdhock/animint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tdhock/animint/labels{/name}","releases_url":"https://api.github.com/repos/tdhock/animint/releases{/id}","created_at":"2013-02-25T00:27:47Z","updated_at":"2015-06-02T19:36:52Z","pushed_at":"2015-06-19T04:17:51Z","git_url":"git://github.com/tdhock/animint.git","ssh_url":"git@github.com:tdhock/animint.git","clone_url":"https://github.com/tdhock/animint.git","svn_url":"https://github.com/tdhock/animint","homepage":"","size":137121,"stargazers_count":58,"watchers_count":58,"language":"R","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":22,"mirror_url":null,"open_issues_count":10,"forks":22,"open_issues":10,"watchers":58,"default_branch":"master"}},"base":{"label":"tdhock:master","ref":"master","sha":"7e57b1f334327fc4497ced1d833888c047875a70","user":{"login":"tdhock","id":932850,"avatar_url":"https://avatars.githubusercontent.com/u/932850?v=3","gravatar_id":"","url":"https://api.github.com/users/tdhock","html_url":"https://github.com/tdhock","followers_url":"https://api.github.com/users/tdhock/followers","following_url":"https://api.github.com/users/tdhock/following{/other_user}","gists_url":"https://api.github.com/users/tdhock/gists{/gist_id}","starred_url":"https://api.github.com/users/tdhock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdhock/subscriptions","organizations_url":"https://api.github.com/users/tdhock/orgs","repos_url":"https://api.github.com/users/tdhock/repos","events_url":"https://api.github.com/users/tdhock/events{/privacy}","received_events_url":"https://api.github.com/users/tdhock/received_events","type":"User","site_admin":false},"repo":{"id":8399379,"name":"animint","full_name":"tdhock/animint","owner":{"login":"tdhock","id":932850,"avatar_url":"https://avatars.githubusercontent.com/u/932850?v=3","gravatar_id":"","url":"https://api.github.com/users/tdhock","html_url":"https://github.com/tdhock","followers_url":"https://api.github.com/users/tdhock/followers","following_url":"https://api.github.com/users/tdhock/following{/other_user}","gists_url":"https://api.github.com/users/tdhock/gists{/gist_id}","starred_url":"https://api.github.com/users/tdhock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdhock/subscriptions","organizations_url":"https://api.github.com/users/tdhock/orgs","repos_url":"https://api.github.com/users/tdhock/repos","events_url":"https://api.github.com/users/tdhock/events{/privacy}","received_events_url":"https://api.github.com/users/tdhock/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tdhock/animint","description":"animated and interactive web graphics","fork":false,"url":"https://api.github.com/repos/tdhock/animint","forks_url":"https://api.github.com/repos/tdhock/animint/forks","keys_url":"https://api.github.com/repos/tdhock/animint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tdhock/animint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tdhock/animint/teams","hooks_url":"https://api.github.com/repos/tdhock/animint/hooks","issue_events_url":"https://api.github.com/repos/tdhock/animint/issues/events{/number}","events_url":"https://api.github.com/repos/tdhock/animint/events","assignees_url":"https://api.github.com/repos/tdhock/animint/assignees{/user}","branches_url":"https://api.github.com/repos/tdhock/animint/branches{/branch}","tags_url":"https://api.github.com/repos/tdhock/animint/tags","blobs_url":"https://api.github.com/repos/tdhock/animint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tdhock/animint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tdhock/animint/git/refs{/sha}","trees_url":"https://api.github.com/repos/tdhock/animint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tdhock/animint/statuses/{sha}","languages_url":"https://api.github.com/repos/tdhock/animint/languages","stargazers_url":"https://api.github.com/repos/tdhock/animint/stargazers","contributors_url":"https://api.github.com/repos/tdhock/animint/contributors","subscribers_url":"https://api.github.com/repos/tdhock/animint/subscribers","subscription_url":"https://api.github.com/repos/tdhock/animint/subscription","commits_url":"https://api.github.com/repos/tdhock/animint/commits{/sha}","git_commits_url":"https://api.github.com/repos/tdhock/animint/git/commits{/sha}","comments_url":"https://api.github.com/repos/tdhock/animint/comments{/number}","issue_comment_url":"https://api.github.com/repos/tdhock/animint/issues/comments{/number}","contents_url":"https://api.github.com/repos/tdhock/animint/contents/{+path}","compare_url":"https://api.github.com/repos/tdhock/animint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tdhock/animint/merges","archive_url":"https://api.github.com/repos/tdhock/animint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tdhock/animint/downloads","issues_url":"https://api.github.com/repos/tdhock/animint/issues{/number}","pulls_url":"https://api.github.com/repos/tdhock/animint/pulls{/number}","milestones_url":"https://api.github.com/repos/tdhock/animint/milestones{/number}","notifications_url":"https://api.github.com/repos/tdhock/animint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tdhock/animint/labels{/name}","releases_url":"https://api.github.com/repos/tdhock/animint/releases{/id}","created_at":"2013-02-25T00:27:47Z","updated_at":"2015-06-02T19:36:52Z","pushed_at":"2015-06-19T04:17:51Z","git_url":"git://github.com/tdhock/animint.git","ssh_url":"git@github.com:tdhock/animint.git","clone_url":"https://github.com/tdhock/animint.git","svn_url":"https://github.com/tdhock/animint","homepage":"","size":137121,"stargazers_count":58,"watchers_count":58,"language":"R","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":22,"mirror_url":null,"open_issues_count":10,"forks":22,"open_issues":10,"watchers":58,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tdhock/animint/pulls/74"},"html":{"href":"https://github.com/tdhock/animint/pull/74"},"issue":{"href":"https://api.github.com/repos/tdhock/animint/issues/74"},"comments":{"href":"https://api.github.com/repos/tdhock/animint/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/tdhock/animint/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/tdhock/animint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tdhock/animint/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/tdhock/animint/statuses/d2723bdb4ed8aae31f3708ed5cb222dc86e529d9"}}}}