Closed BuzzyLizzy closed 1 year ago
I can additionally add that I am getting this error in the Chrome inspector:
Uncaught TypeError: Cannot read properties of null (reading 'getTotalLength')
at LabelWidget.tsx:43:1
at Array.map (<anonymous>)
at LabelWidget.findPathAndRelativePositionToRenderLabel (LabelWidget.tsx:43:1)
at LabelWidget.calculateLabelPosition (LabelWidget.tsx:67:1)
I found the problem, I wrapped the diagram inside this:
I found the problem, I wrapped the diagram inside this:
.... the diagram ..... </React.StrictMode> when I removed that it started working correctly.
This is not a good solution, you should keep it: https://react.dev/learn/keeping-components-pure#detecting-impure-calculations-with-strict-mode
Followed the basic demo example, the label does not work it is not on the line of the link between the 2 nodes, but in the top left corner of the canvas, here is my code, exactly that of the demo: