Mercurial > gemma
changeset 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 | 1e837d86bead |
children | e3e17396f09a |
files | client/src/lib/mixins.js |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
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,