ugurdogrusoz / visuall

Visuall: A tool for convenient construction of a web based visual analysis component
2 stars 0 forks source link

Initial node placement issue #375

Closed ugurdogrusoz closed 3 years ago

ugurdogrusoz commented 3 years ago

When we incrementally perform layout (e.g. neighbors of a node), we determine the initial positions of newly brought nodes using the layout utilities extension (placeNewNodes(nodesWithoutLayout)), but it doesn't look like this is workly properly though. For instance, see the newly placed neighbor nodes here. They are placed "tangling" with existing nodes. The utility is there to avoid exactly this and use the available space instead. Let's first confirm that we use the extension and we use it correctly. image

canbax commented 3 years ago

How this occurs? It seems like the layout is not run after an operation. This might happen if "Perform layout on changes" is false. If it is false, we don't make a layout and we don't call placeNewNodes. Should we call it even if we don't run the layout?

ugurdogrusoz commented 3 years ago

I intentionally disabled layout on changes to see the initial placement. Is the initial placement done thru the extension properly is my question. Are you sure no operation is called from the extension when layout is disabled? How do we determine the initial places of the resulting nodes then? By default they should go to (0,0).

canbax commented 3 years ago

Yes, you are right. We are calling placeNewNodes here. https://github.com/ugurdogrusoz/visuall/blob/8764a816452abbec3c46f2318bcdfb26ba8d8280/src/app/visuall/cytoscape.service.ts#L217

It seems like we are calling it as expected.

ugurdogrusoz commented 3 years ago

This is due to the extension (see this).

ugurdogrusoz commented 3 years ago

This is fixed now in the extension.