iVis-at-Bilkent / cytoscape.js-fcose

fCoSE: a fast Compound Spring Embedder
MIT License
134 stars 25 forks source link

Overlapping labels for unconnected nodes #62

Closed burner1024 closed 1 year ago

burner1024 commented 1 year ago

Even nodeDimensionsIncludeLabels: true doesn't help: Captura desde 2023-01-23 04-52-35

ugurdogrusoz commented 1 year ago

In this example, does not look like nodeDimensionsIncludeLabels is true but in any case, with such a dense graph node overlaps will be unavoidable. The only thing that might help is increasing the idealEdgeLength option.

burner1024 commented 1 year ago

I'm talking about the right side, all the free nodes. I don't think edge length would have any effect on that anyway?

hasanbalci commented 1 year ago

@burner1024 Please see this example where nodeDimensionsIncludeLabels option works.

burner1024 commented 1 year ago

It appears so. I will re-check, thank you.

burner1024 commented 1 year ago

My bad, I passed layout option to original cytoscape invocation, then ran it separately.

options = {...}
const cy = cytoscape({
        layout: {
            name: "fcose",
        },
...
};
cy.layout(options).run()

Shouldn't have passed layout arg to cytoscape. Looks like it ran the algorithm with default options.

Thanks again.