Mercurial > gemma
diff client/src/lib/mixins.js @ 3336:db1dc197dc43
client: diagram-template: cleanup
* add default values to diagramtitle element
* fix positioning of title element
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Mon, 20 May 2019 17:40:16 +0200 |
parents | 76f643d20f19 |
children | 107de6def0c3 |
line wrap: on
line diff
--- a/client/src/lib/mixins.js Mon May 20 17:34:43 2019 +0200 +++ b/client/src/lib/mixins.js Mon May 20 17:40:16 2019 +0200 @@ -156,7 +156,7 @@ addDiagramTitle(position, offset, size, color, text) { let x = offset.x, y = offset.y; - + this.pdf.doc.setFontSize(size); let width = (this.pdf.doc.getStringUnitWidth(text) * size) / (72 / 25.6) + size / 2; // if position is on the right, x needs to be calculate with pdf width and @@ -168,7 +168,6 @@ y = this.pdf.height - offset.y - this.getTextHeight(1); } this.pdf.doc.setTextColor(color); - this.pdf.doc.setFontSize(size); this.pdf.doc.setFontStyle("bold"); this.pdf.doc.text(text, x, y, { baseline: "hanging" }); },