{"action":"created","comment":{"url":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/comments/204595018","pull_request_review_id":139701946,"id":204595018,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDU5NTAxOA==","diff_hunk":"@@ -95,6 +95,66 @@ let layout = cy => {\n \n let bindCyEvents = cy => {\n \n+  /**\n+   * @description Apply style modifications after 200ms delay on `mouseover` for non-compartment nodes.\n+   * Currently puts opacity of hovered node & neighbourhood to 1, everything else to 0.3\n+   */\n+  const nodeHoverMouseOver = _.debounce(evt => {\n+    const node = evt.target;\n+    const ecAPI = cy.expandCollapse('get');\n+    let elesToHighlight = new Set();\n+\n+    //If node has children and is expanded, do not highlight\n+    if (node.isParent() && ecAPI.isCollapsible(node)) { return; }\n+\n+    //Create a list of the hovered node & its neighbourhood\n+    node.neighborhood().nodes().union(node).forEach(node => {\n+      node.ancestors().forEach(ancestor => elesToHighlight.add(ancestor));\n+      node.descendants().forEach(descendant => elesToHighlight.add(descendant));\n+      elesToHighlight.add(node);\n+    });\n+    node.neighborhood().edges().forEach(edge => elesToHighlight.add(edge));\n+\n+    //Add highlighted class to node & its neighbourhood, unhighlighted to everything else\n+    //batch for improved perf\n+    cy.batch( () => {\n+      cy.elements().addClass('unhighlighted');\n+      elesToHighlight.forEach(ele => {\n+        ele.removeClass('unhighlighted');\n+        ele.addClass('highlighted');\n+      });\n+    });\n+\n+  },200,{leading:false,trailing:true});\n+\n+    /**\n+   * @description Apply style modifications after 200ms delay on `mouseover` for edges.\n+   * Currently puts opacity of hovered edge & neighbourhood to 1, everything else to 0.3\n+   */\n+  const edgeHoverMouseOver = _.debounce(evt => {\n+    const edge = evt.target;\n+    let elesToHighlight = new Set();","path":"src/client/features/pathways/pathways-cy.js","position":42,"original_position":42,"commit_id":"f64bdfa6f05bcd2dccc845f454cb17c0d6d40fcc","original_commit_id":"f64bdfa6f05bcd2dccc845f454cb17c0d6d40fcc","user":{"login":"maxkfranz","id":989043,"node_id":"MDQ6VXNlcjk4OTA0Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/989043?v=4","gravatar_id":"","url":"https://api.github.com/users/maxkfranz","html_url":"https://github.com/maxkfranz","followers_url":"https://api.github.com/users/maxkfranz/followers","following_url":"https://api.github.com/users/maxkfranz/following{/other_user}","gists_url":"https://api.github.com/users/maxkfranz/gists{/gist_id}","starred_url":"https://api.github.com/users/maxkfranz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxkfranz/subscriptions","organizations_url":"https://api.github.com/users/maxkfranz/orgs","repos_url":"https://api.github.com/users/maxkfranz/repos","events_url":"https://api.github.com/users/maxkfranz/events{/privacy}","received_events_url":"https://api.github.com/users/maxkfranz/received_events","type":"User","site_admin":false},"body":"It's generally better to use a Collection as a set for cy eles.  E.g.\r\n\r\n```\r\nlet eles = cy.collection();\r\n\r\neles.merge(elesToAdd);\r\neles.merge(moreElesToAdd);\r\n```\r\n\r\nUsing a Set could give weird results if you get an Element versus a Collection.","created_at":"2018-07-24T00:46:28Z","updated_at":"2018-07-24T00:46:58Z","html_url":"https://github.com/PathwayCommons/app-ui/pull/925#discussion_r204595018","pull_request_url":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/925","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/comments/204595018"},"html":{"href":"https://github.com/PathwayCommons/app-ui/pull/925#discussion_r204595018"},"pull_request":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/925"}}},"pull_request":{"url":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/925","id":203242083,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzMjQyMDgz","html_url":"https://github.com/PathwayCommons/app-ui/pull/925","diff_url":"https://github.com/PathwayCommons/app-ui/pull/925.diff","patch_url":"https://github.com/PathwayCommons/app-ui/pull/925.patch","issue_url":"https://api.github.com/repos/PathwayCommons/app-ui/issues/925","number":925,"state":"closed","locked":false,"title":"Hover Rework added to new pathways view","user":{"login":"MichaelWrana","id":25777239,"node_id":"MDQ6VXNlcjI1Nzc3MjM5","avatar_url":"https://avatars2.githubusercontent.com/u/25777239?v=4","gravatar_id":"","url":"https://api.github.com/users/MichaelWrana","html_url":"https://github.com/MichaelWrana","followers_url":"https://api.github.com/users/MichaelWrana/followers","following_url":"https://api.github.com/users/MichaelWrana/following{/other_user}","gists_url":"https://api.github.com/users/MichaelWrana/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelWrana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelWrana/subscriptions","organizations_url":"https://api.github.com/users/MichaelWrana/orgs","repos_url":"https://api.github.com/users/MichaelWrana/repos","events_url":"https://api.github.com/users/MichaelWrana/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelWrana/received_events","type":"User","site_admin":false},"body":"Needed to be added to the `pathway` specific event files.\r\nRefs #868","created_at":"2018-07-23T14:42:20Z","updated_at":"2018-07-24T00:46:58Z","closed_at":"2018-07-23T18:52:12Z","merged_at":"2018-07-23T18:52:12Z","merge_commit_sha":"1f991f2e868747ed010821a7b13586e7a6caaece","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/925/commits","review_comments_url":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/925/comments","review_comment_url":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PathwayCommons/app-ui/issues/925/comments","statuses_url":"https://api.github.com/repos/PathwayCommons/app-ui/statuses/f64bdfa6f05bcd2dccc845f454cb17c0d6d40fcc","head":{"label":"MichaelWrana:hover-rework","ref":"hover-rework","sha":"f64bdfa6f05bcd2dccc845f454cb17c0d6d40fcc","user":{"login":"MichaelWrana","id":25777239,"node_id":"MDQ6VXNlcjI1Nzc3MjM5","avatar_url":"https://avatars2.githubusercontent.com/u/25777239?v=4","gravatar_id":"","url":"https://api.github.com/users/MichaelWrana","html_url":"https://github.com/MichaelWrana","followers_url":"https://api.github.com/users/MichaelWrana/followers","following_url":"https://api.github.com/users/MichaelWrana/following{/other_user}","gists_url":"https://api.github.com/users/MichaelWrana/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelWrana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelWrana/subscriptions","organizations_url":"https://api.github.com/users/MichaelWrana/orgs","repos_url":"https://api.github.com/users/MichaelWrana/repos","events_url":"https://api.github.com/users/MichaelWrana/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelWrana/received_events","type":"User","site_admin":false},"repo":{"id":132024763,"node_id":"MDEwOlJlcG9zaXRvcnkxMzIwMjQ3NjM=","name":"app-ui","full_name":"MichaelWrana/app-ui","owner":{"login":"MichaelWrana","id":25777239,"node_id":"MDQ6VXNlcjI1Nzc3MjM5","avatar_url":"https://avatars2.githubusercontent.com/u/25777239?v=4","gravatar_id":"","url":"https://api.github.com/users/MichaelWrana","html_url":"https://github.com/MichaelWrana","followers_url":"https://api.github.com/users/MichaelWrana/followers","following_url":"https://api.github.com/users/MichaelWrana/following{/other_user}","gists_url":"https://api.github.com/users/MichaelWrana/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelWrana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelWrana/subscriptions","organizations_url":"https://api.github.com/users/MichaelWrana/orgs","repos_url":"https://api.github.com/users/MichaelWrana/repos","events_url":"https://api.github.com/users/MichaelWrana/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelWrana/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MichaelWrana/app-ui","description":null,"fork":true,"url":"https://api.github.com/repos/MichaelWrana/app-ui","forks_url":"https://api.github.com/repos/MichaelWrana/app-ui/forks","keys_url":"https://api.github.com/repos/MichaelWrana/app-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MichaelWrana/app-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MichaelWrana/app-ui/teams","hooks_url":"https://api.github.com/repos/MichaelWrana/app-ui/hooks","issue_events_url":"https://api.github.com/repos/MichaelWrana/app-ui/issues/events{/number}","events_url":"https://api.github.com/repos/MichaelWrana/app-ui/events","assignees_url":"https://api.github.com/repos/MichaelWrana/app-ui/assignees{/user}","branches_url":"https://api.github.com/repos/MichaelWrana/app-ui/branches{/branch}","tags_url":"https://api.github.com/repos/MichaelWrana/app-ui/tags","blobs_url":"https://api.github.com/repos/MichaelWrana/app-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MichaelWrana/app-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MichaelWrana/app-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/MichaelWrana/app-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MichaelWrana/app-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/MichaelWrana/app-ui/languages","stargazers_url":"https://api.github.com/repos/MichaelWrana/app-ui/stargazers","contributors_url":"https://api.github.com/repos/MichaelWrana/app-ui/contributors","subscribers_url":"https://api.github.com/repos/MichaelWrana/app-ui/subscribers","subscription_url":"https://api.github.com/repos/MichaelWrana/app-ui/subscription","commits_url":"https://api.github.com/repos/MichaelWrana/app-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/MichaelWrana/app-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/MichaelWrana/app-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/MichaelWrana/app-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/MichaelWrana/app-ui/contents/{+path}","compare_url":"https://api.github.com/repos/MichaelWrana/app-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MichaelWrana/app-ui/merges","archive_url":"https://api.github.com/repos/MichaelWrana/app-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MichaelWrana/app-ui/downloads","issues_url":"https://api.github.com/repos/MichaelWrana/app-ui/issues{/number}","pulls_url":"https://api.github.com/repos/MichaelWrana/app-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/MichaelWrana/app-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/MichaelWrana/app-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MichaelWrana/app-ui/labels{/name}","releases_url":"https://api.github.com/repos/MichaelWrana/app-ui/releases{/id}","deployments_url":"https://api.github.com/repos/MichaelWrana/app-ui/deployments","created_at":"2018-05-03T16:53:14Z","updated_at":"2018-05-03T16:53:16Z","pushed_at":"2018-07-23T16:52:34Z","git_url":"git://github.com/MichaelWrana/app-ui.git","ssh_url":"git@github.com:MichaelWrana/app-ui.git","clone_url":"https://github.com/MichaelWrana/app-ui.git","svn_url":"https://github.com/MichaelWrana/app-ui","homepage":null,"size":21202,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PathwayCommons:development","ref":"development","sha":"25e7070b01c5d36fb1840a194bb09ad105124dbe","user":{"login":"PathwayCommons","id":1605506,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDU1MDY=","avatar_url":"https://avatars3.githubusercontent.com/u/1605506?v=4","gravatar_id":"","url":"https://api.github.com/users/PathwayCommons","html_url":"https://github.com/PathwayCommons","followers_url":"https://api.github.com/users/PathwayCommons/followers","following_url":"https://api.github.com/users/PathwayCommons/following{/other_user}","gists_url":"https://api.github.com/users/PathwayCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/PathwayCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PathwayCommons/subscriptions","organizations_url":"https://api.github.com/users/PathwayCommons/orgs","repos_url":"https://api.github.com/users/PathwayCommons/repos","events_url":"https://api.github.com/users/PathwayCommons/events{/privacy}","received_events_url":"https://api.github.com/users/PathwayCommons/received_events","type":"Organization","site_admin":false},"repo":{"id":104936681,"node_id":"MDEwOlJlcG9zaXRvcnkxMDQ5MzY2ODE=","name":"app-ui","full_name":"PathwayCommons/app-ui","owner":{"login":"PathwayCommons","id":1605506,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDU1MDY=","avatar_url":"https://avatars3.githubusercontent.com/u/1605506?v=4","gravatar_id":"","url":"https://api.github.com/users/PathwayCommons","html_url":"https://github.com/PathwayCommons","followers_url":"https://api.github.com/users/PathwayCommons/followers","following_url":"https://api.github.com/users/PathwayCommons/following{/other_user}","gists_url":"https://api.github.com/users/PathwayCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/PathwayCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PathwayCommons/subscriptions","organizations_url":"https://api.github.com/users/PathwayCommons/orgs","repos_url":"https://api.github.com/users/PathwayCommons/repos","events_url":"https://api.github.com/users/PathwayCommons/events{/privacy}","received_events_url":"https://api.github.com/users/PathwayCommons/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PathwayCommons/app-ui","description":"Web UI for accessing Pathway Commons data","fork":false,"url":"https://api.github.com/repos/PathwayCommons/app-ui","forks_url":"https://api.github.com/repos/PathwayCommons/app-ui/forks","keys_url":"https://api.github.com/repos/PathwayCommons/app-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PathwayCommons/app-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PathwayCommons/app-ui/teams","hooks_url":"https://api.github.com/repos/PathwayCommons/app-ui/hooks","issue_events_url":"https://api.github.com/repos/PathwayCommons/app-ui/issues/events{/number}","events_url":"https://api.github.com/repos/PathwayCommons/app-ui/events","assignees_url":"https://api.github.com/repos/PathwayCommons/app-ui/assignees{/user}","branches_url":"https://api.github.com/repos/PathwayCommons/app-ui/branches{/branch}","tags_url":"https://api.github.com/repos/PathwayCommons/app-ui/tags","blobs_url":"https://api.github.com/repos/PathwayCommons/app-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PathwayCommons/app-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PathwayCommons/app-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/PathwayCommons/app-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PathwayCommons/app-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/PathwayCommons/app-ui/languages","stargazers_url":"https://api.github.com/repos/PathwayCommons/app-ui/stargazers","contributors_url":"https://api.github.com/repos/PathwayCommons/app-ui/contributors","subscribers_url":"https://api.github.com/repos/PathwayCommons/app-ui/subscribers","subscription_url":"https://api.github.com/repos/PathwayCommons/app-ui/subscription","commits_url":"https://api.github.com/repos/PathwayCommons/app-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/PathwayCommons/app-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/PathwayCommons/app-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/PathwayCommons/app-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/PathwayCommons/app-ui/contents/{+path}","compare_url":"https://api.github.com/repos/PathwayCommons/app-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PathwayCommons/app-ui/merges","archive_url":"https://api.github.com/repos/PathwayCommons/app-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PathwayCommons/app-ui/downloads","issues_url":"https://api.github.com/repos/PathwayCommons/app-ui/issues{/number}","pulls_url":"https://api.github.com/repos/PathwayCommons/app-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/PathwayCommons/app-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/PathwayCommons/app-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PathwayCommons/app-ui/labels{/name}","releases_url":"https://api.github.com/repos/PathwayCommons/app-ui/releases{/id}","deployments_url":"https://api.github.com/repos/PathwayCommons/app-ui/deployments","created_at":"2017-09-26T20:53:40Z","updated_at":"2018-07-12T13:15:35Z","pushed_at":"2018-07-24T00:03:39Z","git_url":"git://github.com/PathwayCommons/app-ui.git","ssh_url":"git@github.com:PathwayCommons/app-ui.git","clone_url":"https://github.com/PathwayCommons/app-ui.git","svn_url":"https://github.com/PathwayCommons/app-ui","homepage":"http://apps.pathwaycommons.org","size":21216,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":33,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":13,"open_issues":33,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/925"},"html":{"href":"https://github.com/PathwayCommons/app-ui/pull/925"},"issue":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/issues/925"},"comments":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/issues/925/comments"},"review_comments":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/925/comments"},"review_comment":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/925/commits"},"statuses":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/statuses/f64bdfa6f05bcd2dccc845f454cb17c0d6d40fcc"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"maxkfranz"}}