Mercurial > gemma
changeset 3943:3c468ed76daf
client:pdf-gen: correct default values of diagram size on pdf
* adjust width and height in case missing in template definition
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Fri, 12 Jul 2019 11:39:29 +0200 |
parents | cd8ba6599a99 |
children | 0ed8af02d5a9 |
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 Fri Jul 12 11:20:09 2019 +0200 +++ b/client/src/lib/mixins.js Fri Jul 12 11:39:29 2019 +0200 @@ -231,8 +231,11 @@ this.addDiagram( e.position, e.offset || defaultOffset, - e.width || 200, - e.height || 100 + // use default width,height if they are missing in template definition + e.width || + (this.templateData.properties.paperSize === "a3" ? 318 : 230), + e.height || + (this.templateData.properties.paperSize === "a3" ? 104 : 110) ); break; }