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

Combined (border+image) Program Node Rendering Issue #1427

Open
oda79 opened this issue May 17, 2024 · 1 comment
Open

Combined (border+image) Program Node Rendering Issue #1427

oda79 opened this issue May 17, 2024 · 1 comment
Labels

Comments

@oda79
Copy link

oda79 commented May 17, 2024

Combined (border+image) Program Node Rendering Issue

Description

When using a combined program (node-image and node-border) for rendering nodes, overlapping nodes appear messy. The nodes' borders are rendered separately and on a different layer from their images, resulting in a 'transparent background effect' or incorrect clipping areas. This issue is critical for large graphs, as graphology lacks collision layout, leading to massive node overlap.

Details

  • Sigma.js version: 3.0.0-beta.18
  • Graphology version: 0.25.4
  • Operating system: Windows 11
  • Web browser: Google Chrome Version 124.0.6367.202 (Official Build) (64-bit)

Steps to Reproduce

  1. Visit the live example: Codesandbox Example
  2. Observe the rendering of overlapping nodes.

Expected Behavior

When nodes overlap, their borders should be clipped accordingly, similar to the node 'B' in the reference image below:

Expected Node Overlapping

Actual Behavior

Nodes' borders are displayed regardless of the nodes' z-position, leading to visual artifacts and a cluttered appearance:

Actual Node Overlapping Issue

Additional Information

This issue becomes more noticeable and problematic for large graphs due to the lack of collision layout in Graphology, causing significant node overlap.

@oda79 oda79 added the bug label May 17, 2024
@jacomyal
Copy link
Owner

jacomyal commented May 24, 2024

@oda79 Thanks for that report!

I totally get this issue, and that's bad, and I have no idea how to solve it yet. Maybe something with z indexing, I'll try as soon as I can.

About collision layout in Graphology though, you can use graphology-layout-noverlap. It was not working properly with sigma.js before because we reinterpolated node sizes before, but since v3 you can use zoomToSizeRatioFunction and itemSizesReference (like in this example) to render sizes exactly as they are in the data, which allows graphology-layout-noverlap to work properly.

I hope this helps, until I find how to solve the initial problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants