{"action":"created","issue":{"url":"https://api.github.com/repos/tgdwyer/WebCola/issues/202","repository_url":"https://api.github.com/repos/tgdwyer/WebCola","labels_url":"https://api.github.com/repos/tgdwyer/WebCola/issues/202/labels{/name}","comments_url":"https://api.github.com/repos/tgdwyer/WebCola/issues/202/comments","events_url":"https://api.github.com/repos/tgdwyer/WebCola/issues/202/events","html_url":"https://github.com/tgdwyer/WebCola/issues/202","id":195833910,"number":202,"title":"my nodes are off-centre with respect to their bounds - what should I do?","user":{"login":"colin-combe","id":977607,"avatar_url":"https://avatars.githubusercontent.com/u/977607?v=3","gravatar_id":"","url":"https://api.github.com/users/colin-combe","html_url":"https://github.com/colin-combe","followers_url":"https://api.github.com/users/colin-combe/followers","following_url":"https://api.github.com/users/colin-combe/following{/other_user}","gists_url":"https://api.github.com/users/colin-combe/gists{/gist_id}","starred_url":"https://api.github.com/users/colin-combe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colin-combe/subscriptions","organizations_url":"https://api.github.com/users/colin-combe/orgs","repos_url":"https://api.github.com/users/colin-combe/repos","events_url":"https://api.github.com/users/colin-combe/events{/privacy}","received_events_url":"https://api.github.com/users/colin-combe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-15T15:26:38Z","updated_at":"2016-12-17T09:39:17Z","closed_at":"2016-12-17T09:39:17Z","body":"Hi,\r\nI'm getting good results using webcola, much better than with the d3 force layout. I'm looking forward to getting further into what WebCola can do.\r\n\r\nAt the moment, I think my results are suboptimal because the bounds of my nodes are off-centre with respect their x,y coordinates. \r\n\r\nAs background - I am changing the tool described at  https://www.ncbi.nlm.nih.gov/pubmed/25648531 to use WebCola. In a case like this: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4390258/figure/F4/ , each bar is a node and its x,y coords are the mid point of the bars, so its bounds (which contain the internal links shown as arcs) are quite a bit off-centre. The x,y coords of a node are where lines are drawn to when a node is collapsed to its circular form (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4390258/figure/F6/). \r\n\r\nWebCola sometimes gives results like this:\r\n![screenshot from 2016-12-15 15 05 48](https://cloud.githubusercontent.com/assets/977607/21229128/6ae1f88c-c2d8-11e6-866e-074324bfe895.png)\r\n\r\nI think the node that is in bar form in the screenshot is positioned slightly too high for the reason I mention. Also, I think everything's a bit off to the left for the same reason.\r\n\r\nI have tried to figure out how to fix it, looking into the use of the setXCentre/setYCentre functions and also at how the bounds attribute of nodes gets set. But I haven't had any success - I'm not sure whats happening and there seems to be several places where the bounds get reset/updated.\r\n\r\nWhat's the correct way to deal with this situation (assuming I have managed to explain my problem)?\r\n\r\nAny help much appreciated,\r\nbest wishes,\r\nColin\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/tgdwyer/WebCola/issues/comments/267753385","html_url":"https://github.com/tgdwyer/WebCola/issues/202#issuecomment-267753385","issue_url":"https://api.github.com/repos/tgdwyer/WebCola/issues/202","id":267753385,"user":{"login":"colin-combe","id":977607,"avatar_url":"https://avatars.githubusercontent.com/u/977607?v=3","gravatar_id":"","url":"https://api.github.com/users/colin-combe","html_url":"https://github.com/colin-combe","followers_url":"https://api.github.com/users/colin-combe/followers","following_url":"https://api.github.com/users/colin-combe/following{/other_user}","gists_url":"https://api.github.com/users/colin-combe/gists{/gist_id}","starred_url":"https://api.github.com/users/colin-combe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colin-combe/subscriptions","organizations_url":"https://api.github.com/users/colin-combe/orgs","repos_url":"https://api.github.com/users/colin-combe/repos","events_url":"https://api.github.com/users/colin-combe/events{/privacy}","received_events_url":"https://api.github.com/users/colin-combe/received_events","type":"User","site_admin":false},"created_at":"2016-12-17T09:39:17Z","updated_at":"2016-12-17T09:39:17Z","body":"Actually, I think I can deal with this by renaming the x and y attributes I use and and then maintaining seperate 'x' and 'y' attributes that really are the centre of the bounds.\r\n\r\nI asked the question because I saw the the setXCentre and setYCentre functions and thought there was perhaps a built in way of dealing with this.\r\n\r\nI'll close this - its probably not really an issue with webcola."}}
{"actor":{"display_login":"colin-combe"}}