Open mamjerez opened 11 months ago
Not exactly sure I understand what you mean but you can certainly have less confusing HTML generation
https://stackblitz.com/edit/js-yw1urt?file=index.html
You can also check out other examples
Thank you for your quick response. My observation is to have the HTML code in a function, which allows for better structuring and easier variable modification. But this is just the opinion of a beginner. Here is the example code: https://stackblitz.com/edit/js-s4fsy9?file=index.html
A few more complex example: https://stackblitz.com/edit/js-qjelje?file=index.html
Looks good, whatever suits your requirement, you should go for it
Thanks for your comment. I hope you continue to improve your magnificent library
Congratulations on the magnificent library. Thank you for your work. Would it be possible to have a function to define the node, something less confusing, for example:
createNodeHtml(d) { // Pre-cálculo de valores const paddingSize = 25 + 2; const nodeWidth = d.width - 2; const nodeHeight = d.height - paddingSize; const marginTop = -(paddingSize + 20); const borderStyle = d.data._highlighted || d.data._upToTheRootHighlighted ? '5px solid #E27396' : '2px solid #808080';