Closed loucarpe closed 3 years ago
In DiamondNodeWidget class this.props.node.getOptions().color
is this returning correct color codes that you are passing to it?
Closing as this is not a library bug or feature, hope you were able to debug the issue.
Hello, I am playing a little with this wonderful librairy to see if I can use it for an internship project. I have started working on the Drag And Drop Demo using the DiamondNode from the Custom Node Demo I modified myself.
But I am having an issue with the DiamondNode, I am not able to have color passed as property when I am calling the DiamondNodeModel class, I don't think this an issue with the librairy itself, it's more likely I didn't get something.
Here is some code to illustrate :
First the BodyWidget.tsx file from DnD Demo : https://pastebin.com/k7aUYukd Please don't mind the differents TrayItemWidget called that way I know it's ugly. You can see on line 70 that I am calling the DiamondNodeModel with a color property, but when the generated Node is dropped, no color is displayed. Here is my modified DiamondNodeModel.ts file : https://pastebin.com/LHV7FTET and my own DiamondNodeWidget.ts : https://pastebin.com/SZCekcKx
Can someone give me some tips to solve this issue ? I am planning to have differents PNG image file with the different colors but I think it will be the same issue for me so it will be two birds with one stone for me if I get some help.
Thanks =D
PS: I am thinking of starting all over from a clean slate rather than using DiamondNode.