magjac / d3-graphviz

Graphviz DOT rendering and animated transitions using D3
BSD 3-Clause "New" or "Revised" License
1.67k stars 103 forks source link

DOMException during transition when edge `arrowsize=0` and shape tweening is enabled #300

Open magjac opened 6 months ago

magjac commented 6 months ago

When transitioning from one graph to another with shape tweening enabled and edge arrowsize=0, the following error appears in the console:

Uncaught DOMException: SVGGeometryElement.getPointAtLength: No path available for measuring
    points tweening.js:32
    pathTweenPoints tweening.js:30
    calculatePathTweenPoints dot.js:203
    postProcessDataPass1Local dot.js:214
    postProcessDataPass1Local dot.js:225
    postProcessDataPass1Local dot.js:216
    postProcessDataPass1Local dot.js:225
    postProcessDataPass1Local dot.js:216
    postProcessDataPass1Local dot.js:225
    postProcessDataPass1Local dot.js:216
    layoutDone dot.js:343
    dot dot.js:118
    layout dot.js:77
    onmessage dot.js:41
    initViz dot.js:39
    Graphviz graphviz.js:159
    selection_graphviz graphviz.js:14
    <anonymous> basic-path-tween.html:11
[d3-graphviz.js:390]

First graph:

digraph {a -> b}

Second graph:

digraph {a -> b [arrowsize=0]}