Mercurial > gemma
changeset 2292:7b62191ed955
client: pdf-gen: improve textbox function
* width of the textbox is calculated based on its content
when the template does not define it explicilty
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Fri, 15 Feb 2019 16:44:42 +0100 |
parents | 60af456d01f0 |
children | 1fa336076a17 |
files | client/src/components/Pdftool.vue |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/Pdftool.vue Fri Feb 15 15:58:21 2019 +0100 +++ b/client/src/components/Pdftool.vue Fri Feb 15 16:44:42 2019 +0100 @@ -457,7 +457,7 @@ text ) { if (!width) { - width = this.pdf.width - offset.x; + width = Math.max(this.pdf.doc.getTextWidth(text)) + padding; } let textWidth = width - 2 * padding; if (!height) {