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

Cannot set label colors to a different color than the edge *and* label colors change on zoom #1496

Open
mikebski opened this issue Dec 16, 2024 · 1 comment
Labels

Comments

@mikebski
Copy link

  • Sigma.js version : 2.4.0
  • Graphology version : 0.25.4
  • Operating system: Mac OS
  • Web browser: FF 133.0.3
  • See example code - it's a self-contained example
    1. Labels should be rendered in black and not change colors
    1. Labels are initially rendered as the same color as their edge, when resizing the labels all change to the same color, which is the color of the last edge added in the code (see small example below).

Steps to reproduce: Click here and resize with the mouse/zoom feature and watch the label color get messed up. It also sets the labelColor and the global label color but neither of those work. Note that if you switch the order that the edges are added the final label color follows that.

https://codesandbox.io/p/sandbox/sigma-template-forked-znjq75

@mikebski mikebski added the bug label Dec 16, 2024
@mikebski
Copy link
Author

Looking at the source, if I change my settings to this I get all black labels, so that is OK:

const settings = {
        renderEdgeLabels: true,
        renderer: {
            container: document.getElementById('sigma-container'),
            type: 'canvas'
        },
        edgeLabelColor: { color: '#000'}
    };

However, the point still stands that I can't set individual edge label colors - they are all the same color as the last one added...

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

1 participant