comparison client/src/components/gauge/HydrologicalConditions.vue @ 3910:29b294e77a5c

client: pdf-gen: set diagram scale on pdf and adjust default template value(waterlevels, hydrologicalconditions)
author Fadi Abbud <fadi.abbud@intevation.de>
date Thu, 11 Jul 2019 10:39:06 +0200
parents 0149b68a4f7e
children f7f09f32d6e0
comparison
equal deleted inserted replaced
3909:2e7f191bba27 3910:29b294e77a5c
132 elements: [ 132 elements: [
133 { 133 {
134 type: "diagram", 134 type: "diagram",
135 position: "topleft", 135 position: "topleft",
136 offset: { x: 15, y: 50 }, 136 offset: { x: 15, y: 50 },
137 width: 290, 137 width: 240,
138 height: 100 138 height: 100
139 }, 139 },
140 { 140 {
141 type: "diagramlegend", 141 type: "diagramlegend",
142 position: "topleft", 142 position: "topleft",
143 offset: { x: 30, y: 150 }, 143 offset: { x: 42, y: 172 },
144 colot: "black" 144 colot: "black"
145 }, 145 },
146 { 146 {
147 type: "diagramtitle", 147 type: "diagramtitle",
148 position: "topleft", 148 position: "topleft",
264 y = this.pdf.height - offset.y - height; 264 y = this.pdf.height - offset.y - height;
265 } 265 }
266 svg2pdf(svg, this.pdf.doc, { 266 svg2pdf(svg, this.pdf.doc, {
267 xOffset: x, 267 xOffset: x,
268 yOffset: y, 268 yOffset: y,
269 // TODO depend on the size and aspect ration on paper 269 scale: 0.353
270 scale: 0.2
271 }); 270 });
272 offScreen.removeChild(svg); 271 offScreen.removeChild(svg);
273 }, 272 },
274 applyChange() { 273 applyChange() {
275 if (this.form.template.hasOwnProperty("properties")) { 274 if (this.form.template.hasOwnProperty("properties")) {