d3-graphviz icon indicating copy to clipboard operation
d3-graphviz copied to clipboard

Fix rare use of undefined variable

Open starboerg opened this issue 4 years ago • 3 comments

Variable x2 was used undefined in case of polygons without y-extend. Defaulting x2 to zero works around this issue.

starboerg avatar Jun 07 '21 09:06 starboerg

Codecov Report

Merging #196 (54d1d6d) into master (ee30f6e) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #196   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           36        36           
  Lines         1107      1108    +1     
=========================================
+ Hits          1107      1108    +1     
Impacted Files Coverage Δ
src/svg.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ee30f6e...54d1d6d. Read the comment docs.

codecov[bot] avatar Jun 07 '21 09:06 codecov[bot]

@starboerg Thanks for the contribution and apologies for the delay. Can you provide an example that trigger this? Or even better, add a test case?

magjac avatar Feb 05 '22 06:02 magjac

@magjac I did not dive too deep into the code, just stumbled upon this issue. I use a sequence of graphs and transition them into each other: graphviz.transition(function () { return d3.transition("main").ease(d3.easeLinear).delay(0).duration(500); }); Likely a horizontal line element in the graphs triggers this, but I did not keep any example.

starboerg avatar Apr 06 '22 08:04 starboerg