Mercurial > gemma
changeset 4480:004d08038319
client: pdf-gen: add bottleneck info to default template and improve it
* add legend and bottleneck to the default template
* add more padding to bottleneck element for better layout
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Thu, 26 Sep 2019 11:21:37 +0200 |
parents | 2d2c9f98360a |
children | 43c52a2d4f17 |
files | client/src/components/Pdftool.vue |
diffstat | 1 files changed, 25 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/Pdftool.vue Wed Sep 25 16:58:38 2019 +0200 +++ b/client/src/components/Pdftool.vue Thu Sep 26 11:21:37 2019 +0200 @@ -153,13 +153,12 @@ { type: "scalebar", position: "bottomright", - offset: { x: 2, y: 2 } + offset: { x: 1, y: 1 } }, { type: "textbox", position: "bottomleft", - offset: { x: 2, y: 2 }, - width: 60, + offset: { x: 1, y: 1 }, fontSize: 8, text: this.$gettext("Generated by") + " " + "{user}, {date}" }, @@ -168,6 +167,16 @@ position: "topleft", offset: { x: 6, y: 4 }, size: 2 + }, + { + type: "bottleneck", + position: "topright", + offset: { x: 2, y: 2 } + }, + { + type: "legend", + position: "topright", + offset: { x: 2, y: 25 } } ] } @@ -749,39 +758,44 @@ // bottleneck this.pdf.doc.setFontStyle("italic"); - this.pdf.doc.text(x + padding, y + padding, str1_1, textOptions); + this.pdf.doc.text(x + padding, y + padding + 2, str1_1, textOptions); this.pdf.doc.setFontStyle("bold"); - this.pdf.doc.text(x + padding + w1_1, y + padding, str1_2, textOptions); + this.pdf.doc.text( + x + padding + w1_1, + y + padding + 2, + str1_2, + textOptions + ); // survey date this.pdf.doc.setFontStyle("italic"); - this.pdf.doc.text(x + padding, y + padding + 4, str2_1, textOptions); + this.pdf.doc.text(x + padding, y + padding + 6, str2_1, textOptions); this.pdf.doc.setFontStyle("normal"); this.pdf.doc.text( x + padding + w2_1, - y + padding + 4, + y + padding + 6, str2_2, textOptions ); // ref gauge this.pdf.doc.setFontStyle("italic"); - this.pdf.doc.text(x + padding, y + padding + 8, str3_1, textOptions); + this.pdf.doc.text(x + padding, y + padding + 10, str3_1, textOptions); this.pdf.doc.setFontStyle("normal"); this.pdf.doc.text( x + padding + w3_1, - y + padding + 8, + y + padding + 10, str3_2, textOptions ); // depth relative to this.pdf.doc.setFontStyle("italic"); - this.pdf.doc.text(x + padding, y + padding + 12, str4_1, textOptions); + this.pdf.doc.text(x + padding, y + padding + 14, str4_1, textOptions); this.pdf.doc.setFontStyle("normal"); this.pdf.doc.text( x + padding + w4_1, - y + padding + 12, + y + padding + 14, str4_2, textOptions );