Skip to content

Commit

Permalink
Ignore last empty line in text same as KiCad
Browse files Browse the repository at this point in the history
  • Loading branch information
qu1ck committed Dec 11, 2018
1 parent 774893c commit 407a105
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions InteractiveHtmlBom/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ function drawtext(ctx, text, color, flip) {
}
var interline = (text.height * 1.5 + text.thickness) / 2;
var txt = text.text.split("\n");
// KiCad ignores last empty line.
if (txt[txt.length-1] == '') txt.pop();
ctx.rotate(deg2rad(angle));
ctx.fillStyle = color;
ctx.strokeStyle = color;
Expand Down

0 comments on commit 407a105

Please sign in to comment.