Mercurial > gemma
comparison client/src/components/gauge/HydrologicalConditions.vue @ 3849:4a584a99bec9
hydrological_conditions: testwise work with fixed pixelratio for PDF-Export
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 08 Jul 2019 17:07:38 +0200 |
parents | 22f7677337a5 |
children | 6ce80daf8413 |
comparison
equal
deleted
inserted
replaced
3848:1f8a89954bc3 | 3849:4a584a99bec9 |
---|---|
254 addDiagram(position, offset, width, height) { | 254 addDiagram(position, offset, width, height) { |
255 let x = offset.x, | 255 let x = offset.x, |
256 y = offset.y; | 256 y = offset.y; |
257 // check if there are tow diagrams on the screen | 257 // check if there are tow diagrams on the screen |
258 // draw the diagram in a separated html element to get the full size | 258 // draw the diagram in a separated html element to get the full size |
259 if ( | 259 this.containerId = "tmpContainer"; |
260 ["GAUGE_WATERLEVEL_HYDROLOGICALCONDITIONS"].indexOf(this.paneSetup) !== | 260 // set width and height |
261 -1 | 261 document.querySelector("#tmpContainer").style.width = "1550px"; |
262 ) { | 262 document.querySelector("#tmpContainer").style.height = "400px"; |
263 this.containerId = "tmpContainer"; | 263 this.drawDiagram(); |
264 // set width and height | |
265 document.querySelector("#tmpContainer").style.width = | |
266 document.querySelector("#hydrologicalconditions-diagram-container") | |
267 .clientWidth * | |
268 2 + | |
269 document.querySelector("#diagramlegendId").clientWidth + | |
270 "px"; | |
271 document.querySelector("#tmpContainer").style.height = | |
272 document.querySelector("#hydrologicalconditions-diagram-container") | |
273 .clientHeight + "px"; | |
274 this.drawDiagram(); | |
275 } | |
276 var svg = document | 264 var svg = document |
277 .getElementById(this.containerId) | 265 .getElementById(this.containerId) |
278 .getElementsByTagName("svg")[0]; | 266 .getElementsByTagName("svg")[0]; |
279 this.containerId = "hydrologicalconditions-diagram-container"; | 267 this.containerId = "hydrologicalconditions-diagram-container"; |
280 // use default width,height if they are missing in the template definition | 268 // use default width,height if they are missing in the template definition |