Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on highly varying node dimensions #32

Closed
herencalik opened this issue Jul 10, 2021 · 3 comments
Closed

Error on highly varying node dimensions #32

herencalik opened this issue Jul 10, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@herencalik
Copy link
Contributor

This problem is caused by the grid implementation. Before the commit 1490906, the root graph's bound was not updated recursively for both in-circle enabled and disabled options as both caused errors when for example there are one enormous node and relatively tiny nodes but now it is updated recursively for the case there is no in circle nodes. The reason recursive update is not done when there are in circle nodes is that it messes up the whole layout. updateBounds() function is in LGraph class of layout-base:
https://github.com/iVis-at-Bilkent/layout-base/blob/3f7549940feef31416cc35ef8256282ebc4d1ecd/src/LGraph.js#L248

@herencalik herencalik added the bug Something isn't working label Jul 10, 2021
@herencalik
Copy link
Contributor Author

herencalik commented Jul 10, 2021

Problem can be replicated by enabling incircle nodes with ratio greater than 0.3 using the graph I attached.
highvarianceinsize.txt

@ugurdogrusoz
Copy link
Contributor

@herencalik Thanks, no errors in this case any more. When you say Update Grid is taken to CiSE level, what do you mean? Since grid is used in cose-bilkent and fcose as well, could this create a problem in those layout styles @hasanbalci ?

@ugurdogrusoz ugurdogrusoz changed the title When the variance is high among node sizes and incircle node option is enabled, layout usually does not work Error on highly varying node dimensions Jul 13, 2021
@herencalik
Copy link
Contributor Author

@herencalik Thanks, no errors in this case any more. When you say Update Grid is taken to CiSE level, what do you mean? Since grid is used in cose-bilkent and fcose as well, could this create a problem in those layout styles @hasanbalci ?

Update Grid function used in CiSE was that of FDLayout's, which used all nodes in grid calculation. Instead of that, I overrode the updateGrid in CiSE, without changing the original one so there shouldn't be a problem with other layouts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants