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

Sigma: could not find a suitable program for node type "pictogram"! #70

Open
shinhanbyeol opened this issue Jun 21, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@shinhanbyeol
Copy link

A node program class named "pictogram" has been defined but cannot be found.

May I know the cause?

Sigma: could not find a suitable program for node type "pictogram"!

Modification of the node default color in the settings has no effect

Sigma.js version: 3.0.0-beta.20
react sigma version : 4.0.2
Graphology version: 0.24.7
Operating System: OSX
Web browser: Chrome

image
image

The program definition is

defined by using border and image
createNodeBorderProgram
createNodeImageProgram

const NodeBorderCustomProgram = createNodeBorderProgram({
  borders: [
    { size: { value: 0.25 }, color: { attribute: 'labelColor' } },
    { size: { fill: true }, color: { attribute: 'color' } },
  ],
});

const NodePictogramCustomProgram = createNodeImageProgram({
  padding: 0.6,
  size: { mode: 'force', value: 256 },
  drawingMode: 'color',
  colorAttribute: 'iconColor',
});

const NodeProgram = createNodeCompoundProgram([
  NodeBorderCustomProgram,
  NodePictogramCustomProgram,
]);
@shinhanbyeol shinhanbyeol added the bug Something isn't working label Jun 21, 2024
@shinhanbyeol
Copy link
Author

allowInvalidContainer=true to the values in the settings
I've solved this problem by that away. Is this the right way to solve it?

@sim51
Copy link
Owner

sim51 commented Jul 5, 2024

Sorry for the lag.
For me it's weird that this setting fixes your issue, it should not be related.
Can you try to remove it, and put your sigma's settings into a useMemo to see if it solves your issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants