{"action":"created","issue":{"url":"https://api.github.com/repos/cpettitt/dagre-d3/issues/261","repository_url":"https://api.github.com/repos/cpettitt/dagre-d3","labels_url":"https://api.github.com/repos/cpettitt/dagre-d3/issues/261/labels{/name}","comments_url":"https://api.github.com/repos/cpettitt/dagre-d3/issues/261/comments","events_url":"https://api.github.com/repos/cpettitt/dagre-d3/issues/261/events","html_url":"https://github.com/cpettitt/dagre-d3/issues/261","id":167571585,"number":261,"title":"Cannot set edges in nodes which are defined as parents.","user":{"login":"keizer619","id":2918812,"avatar_url":"https://avatars.githubusercontent.com/u/2918812?v=3","gravatar_id":"","url":"https://api.github.com/users/keizer619","html_url":"https://github.com/keizer619","followers_url":"https://api.github.com/users/keizer619/followers","following_url":"https://api.github.com/users/keizer619/following{/other_user}","gists_url":"https://api.github.com/users/keizer619/gists{/gist_id}","starred_url":"https://api.github.com/users/keizer619/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keizer619/subscriptions","organizations_url":"https://api.github.com/users/keizer619/orgs","repos_url":"https://api.github.com/users/keizer619/repos","events_url":"https://api.github.com/users/keizer619/events{/privacy}","received_events_url":"https://api.github.com/users/keizer619/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-26T10:13:48Z","updated_at":"2016-10-05T17:40:11Z","closed_at":null,"body":"Imagine there are 3 nodes namely node1, node2 and node3. Then set node3 as the parent of node2. Then i need to create an edge from from node1 to node3. I wrote following code and it gives TypeError: label is undefined. \r\n\r\n`g.setNode(\"node1\", {label: \"node2\"});\r\ng.setNode(\"node2\", {label: \"node2\"});\r\ng.setNode(\"node3\", {label: \"node3\", clusterLabelPos: \"top\", style: \"fill: #ffd47f\"});\r\ng.setParent(\"node2\", \"node3\");\r\ng.setEdge(\"node1\", \"node3\");\r\n`\r\n\r\nif i comment g.setParent('node2', 'node3'); or g.setEdge('node1', 'node3'); graph will be drawn. Apparently we cannot do both for a node.\r\n\r\nhttps://jsfiddle.net/keizer619/6f1dxpa2/"},"comment":{"url":"https://api.github.com/repos/cpettitt/dagre-d3/issues/comments/251745341","html_url":"https://github.com/cpettitt/dagre-d3/issues/261#issuecomment-251745341","issue_url":"https://api.github.com/repos/cpettitt/dagre-d3/issues/261","id":251745341,"user":{"login":"abhijith-gururaj","id":7941660,"avatar_url":"https://avatars.githubusercontent.com/u/7941660?v=3","gravatar_id":"","url":"https://api.github.com/users/abhijith-gururaj","html_url":"https://github.com/abhijith-gururaj","followers_url":"https://api.github.com/users/abhijith-gururaj/followers","following_url":"https://api.github.com/users/abhijith-gururaj/following{/other_user}","gists_url":"https://api.github.com/users/abhijith-gururaj/gists{/gist_id}","starred_url":"https://api.github.com/users/abhijith-gururaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhijith-gururaj/subscriptions","organizations_url":"https://api.github.com/users/abhijith-gururaj/orgs","repos_url":"https://api.github.com/users/abhijith-gururaj/repos","events_url":"https://api.github.com/users/abhijith-gururaj/events{/privacy}","received_events_url":"https://api.github.com/users/abhijith-gururaj/received_events","type":"User","site_admin":false},"created_at":"2016-10-05T17:40:11Z","updated_at":"2016-10-05T17:40:11Z","body":"I am facing the same problem. Don't know when they will fix this.\r\nI have traced the function calls right down to `time(\"    rank\",                   function() { rank(util.asNonCompoundGraph(g)); });`.\r\nThis is where the nodes of the graph are manipulated and the graph is converted into a simplified graph where the compound attribute is set to `false`. Logging the graph after the function call shows that the parent nodes become `undefined'.  Can anyone suggest how to go about this ?"}}
{"actor":{"display_login":"abhijith-gururaj"}}