Sigma: could not find a suitable program for node type "padding"!
I am using sigma.js graph in my react project I want to use image node program with some padding. So I tried implementing according to the storybook examples but I keep on getting this error I tried solving it but I am not able to
If I am doing anything wrong please recommend changes.This is my initialization for nodeProgram and used imports and I am using dependency "@react-sigma/core" for rendering graph.
import { createNodeImageProgram, NodeImageProgram } from "@sigma/node-image";
import { NodeCircleProgram, createNodeCompoundProgram } from "sigma/rendering";
const paddingProgram = useMemo(() => {
return createNodeImageProgram({
padding: 0.1,
objectFit: "contain",
correctCentering: true,
// drawingMode: "color",
});
}, []);
const NodeProgram = useMemo(() => {
return createNodeCompoundProgram([NodeCircleProgram, paddingProgram]);
}, []);
<SigmaContainer
settings={{
allowInvalidContainer: true,
defaultNodeType: "image",
defaultEdgeType: "arrow",
nodeProgramClasses: {
image: NodeImageProgram,
padding: NodeProgram,
},
}}
>
Hi,
I tried to reproduce your error, but without success. You can take a look at this code sandbox : https://codesandbox.io/p/sandbox/sigma-issues-1464-96vcp9
If you want to continue the discussion, can you create a ticket on react-sigma instead ? (I think it's more related to it than to sigma itself).
Thanks !
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.