Mercurial > gemma
diff client/src/lib/mixins.js @ 3919:2c9e96b02573
clinet: pdf-gen: improve addTextBox() function for template
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Thu, 11 Jul 2019 15:14:53 +0200 |
parents | ec1d91fdd6a2 |
children | d859ec6cf2f0 |
line wrap: on
line diff
--- a/client/src/lib/mixins.js Thu Jul 11 14:53:07 2019 +0200 +++ b/client/src/lib/mixins.js Thu Jul 11 15:14:53 2019 +0200 @@ -292,7 +292,10 @@ x = this.pdf.width - offset.x - width; } if (["bottomright", "bottomleft"].indexOf(position) !== -1) { - y = this.pdf.height - offset.y - this.getTextHeight(textLines.length); + y = + this.pdf.height - + offset.y * 0.3 - + this.getTextHeight(textLines.length); } this.pdf.doc.text(textLines, x, y, { baseline: "hanging" }); }, @@ -422,7 +425,7 @@ ); this.addText( position, - { x: offset.x + padding, y: offset.y + padding }, + { x: offset.x + padding, y: offset.y + padding * 2 }, textWidth, fontSize, color,