Skip to content

Commit

Permalink
fix bug in #background directive
Browse files Browse the repository at this point in the history
  • Loading branch information
skanaar committed Sep 21, 2020
1 parent a37e229 commit 159182d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/nomnoml.js
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ var nomnoml;
g.strokeStyle('transparent');
g.fillStyle(config.background);
g.rect(0, 0, compartment.width, compartment.height).fill();
g.restore;
g.restore();
}
g.save();
g.scale(config.zoom, config.zoom);
Expand Down
2 changes: 1 addition & 1 deletion src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ namespace nomnoml {
g.strokeStyle('transparent')
g.fillStyle(config.background)
g.rect(0, 0, compartment.width, compartment.height).fill()
g.restore
g.restore()
}

g.save()
Expand Down
5 changes: 4 additions & 1 deletion test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,12 @@ <h1>Ranker config</h1>
</div>

<div class=testcase>
<h1>Edge label linebreak</h1>
<h1>Edge linebreak, background</h1>
<div nomnoml=canvas>
<script type="text/vnd.nomnoml">
#background: #aaa
#stroke: #eee8d5
#fill: #aaa
[Left] left`association <-> right`association [Right]
</script>
</div>
Expand Down

0 comments on commit 159182d

Please sign in to comment.