Skip to content

Commit

Permalink
Merge pull request #284 from magjac/upgrade-to-graphviz-8.1.0
Browse files Browse the repository at this point in the history
Upgrade to Graphviz 8.1.0
  • Loading branch information
magjac authored Aug 1, 2023
2 parents dfdb840 + d7a6e33 commit d92ddf3
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 37 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
* Upgrade @hpcc-js/wasm to 2.13.1 (Graphviz 8.1.0)

## [5.0.2] – 2022-12-27

Expand Down
66 changes: 44 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"tiny-worker": "^2.1.2"
},
"dependencies": {
"@hpcc-js/wasm": "2.5.0",
"@hpcc-js/wasm": "2.13.1",
"d3-dispatch": "^3.0.1",
"d3-format": "^3.1.0",
"d3-interpolate": "^3.0.1",
Expand Down
12 changes: 6 additions & 6 deletions test/dot-data-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,17 +458,17 @@ var basic_data = {
"attributes": {
"fill": "none",
"stroke": "black",
"d": "M27,-71.7C27,-64.41 27,-55.73 27,-47.54"
"d": "M27,-71.7C27,-64.24 27,-55.32 27,-46.97"
},
"bbox": {
"x": 27,
"y": -71.7,
"width": 0,
"height": 24.160000000000004
"height": 24.730000000000004
},
"center": {
"x": 27,
"y": -59.620000000000005
"y": -59.335
},
"totalLength": 100,
"parent": "[Circular ~.children.1.children.15]",
Expand All @@ -490,17 +490,17 @@ var basic_data = {
"attributes": {
"fill": "black",
"stroke": "black",
"points": "30.5,-47.62 27,-37.62 23.5,-47.62 30.5,-47.62"
"points": "30.5,-47.1 27,-37.1 23.5,-47.1 30.5,-47.1"
},
"bbox": {
"x": 23.5,
"y": -47.62,
"y": -47.1,
"width": 7,
"height": 10
},
"center": {
"x": 27,
"y": -42.62
"y": -42.1
},
"parent": "[Circular ~.children.1.children.15]",
"children": [],
Expand Down
8 changes: 4 additions & 4 deletions test/drawEdge-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ it("Check our understanding of how Graphviz draws edges.", async () => {
assert.equal(d3.selectAll('path').size(), num_edges, 'Number of initial paths');
const arrowHeadLength = 10;
const arrowHeadWidth = 7;
const margin = -0.1;
const margin = -0.14;
// start of edge tail
const x1 = 54.4;
const y1 = -18;
// end of edge arrowhead
const x2 = 88.1;
const x2 = 88.62;
const y2 = -18.000;

const line = d3.selectAll('.edge').selectAll('path').filter(function (d) {
Expand All @@ -55,9 +55,9 @@ it("Check our understanding of how Graphviz draws edges.", async () => {
var expected_y = [];
expected_x.push(x1);
expected_y.push(y1);
expected_x.push(61.89);
expected_x.push(62.06);
expected_y.push(y1);
expected_x.push(70.18);
expected_x.push(70.57);
expected_y.push(y1);
expected_x.push(Math.round((x2 - margin - arrowHeadLength) * 1000) / 1000);
expected_y.push(y2);
Expand Down
2 changes: 1 addition & 1 deletion test/drawNode-shape-egg-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ it("Verify that egg shape is drawn exactly as Graphviz does.", async () => {
.renderDot('digraph {}', resolve);
});

var x = 28.74;
var x = 28.745;
var y = -18;
actualGraphviz
.drawNode(x, y, 'a', { shape: 'egg', id: 'node1' })
Expand Down
2 changes: 1 addition & 1 deletion test/drawNode-shape-triangle-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ it("Verify that triangle shape is drawn exactly as Graphviz does.", async () =>
});

var x = 30.64645;
var y = -30.9504;
var y = -31.0004;
actualGraphviz
.drawNode(x, y, 'a', { shape: 'triangle', id: 'node1' })
.insertDrawnNode('a');
Expand Down
4 changes: 2 additions & 2 deletions test/graphviz-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ it("graphviz().render() renders an SVG from graphviz DOT.", async () => {
<!-- a&#45;&gt;b -->
<g id="edge1" class="edge">
<title>a-&gt;b</title>
<path fill="none" stroke="black" d="M27,-71.7C27,-64.41 27,-55.73 27,-47.54"></path>
<polygon fill="black" stroke="black" points="30.5,-47.62 27,-37.62 23.5,-47.62 30.5,-47.62"></polygon>
<path fill="none" stroke="black" d="M27,-71.7C27,-64.24 27,-55.32 27,-46.97"></path>
<polygon fill="black" stroke="black" points="30.5,-47.1 27,-37.1 23.5,-47.1 30.5,-47.1"></polygon>
</g>
</g>
</svg>`;
Expand Down

0 comments on commit d92ddf3

Please sign in to comment.