iVis-at-Bilkent / cytoscape.js-hyse

Hybrid Spring Embedder
MIT License
1 stars 0 forks source link

Overlapping nodes in the hierarchy #9

Closed ugurdogrusoz closed 1 year ago

ugurdogrusoz commented 1 year ago

As can be seen from the default graph in the demo, the nodes with varying dimensions in the hierarchy often overlap with each other in the y dimension. So, the separation of levels that should be calculated based on the tallest node in that level must be buggy.

hamzaislam101 commented 1 year ago

rank gap now would be 1.5 times the height of the tallest node. Hierarchical nodes do overlap horizontally sometimes, which is inherited from HiSE. I'll debug this one again.

ugurdogrusoz commented 1 year ago

Sounds like this can only be a temporary solution. Using 1.5 times the tallest node is going to result in unnecessary space, which is critical as a layout quality. For instance if the tallest node is of 200 units high, then we dedicate an extra 100 units, where 20 units fixed space would suffice.

hamzaislam101 commented 1 year ago

Added 20 units to the height of the tallest node to get the rank gap value.

ugurdogrusoz commented 1 year ago

It looks like the separation is much bigger? Also, why the frequent overlap of nodes horizontally (not vertically)? image

hamzaislam101 commented 1 year ago

The rank gap should have been (half of the tallest + the constant) because the node is placed half on both sides. I corrected it.

hamzaislam101 commented 1 year ago

The horizontal overlap is from HiSE. I tried correcting this before but couldn't do so. I'll go over this again.

ugurdogrusoz commented 1 year ago

The only issue left here is horizontal overlap now.

ugurdogrusoz commented 1 year ago

With the help of the "repulsion only" phase, this seems to have been resolved. Thanks!