comparison client/src/components/fairway/AvailableFairwayDepth.vue @ 3918:1e837d86bead

available_fairway_lnwl: fixed containerID
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 11 Jul 2019 14:53:07 +0200
parents be0deb139518
children e3e17396f09a
comparison
equal deleted inserted replaced
3917:be0deb139518 3918:1e837d86bead
88 components: { 88 components: {
89 DiagramLegend: () => import("@/components/DiagramLegend") 89 DiagramLegend: () => import("@/components/DiagramLegend")
90 }, 90 },
91 data() { 91 data() {
92 return { 92 return {
93 containerId: "availablefairwaydepth", 93 containerId: "availablefairwaydepth-diagram-container",
94 resizeListenerFunction: null, 94 resizeListenerFunction: null,
95 loading: false, 95 loading: false,
96 scalePaddingLeft: 60, 96 scalePaddingLeft: 60,
97 scalePaddingRight: 0, 97 scalePaddingRight: 0,
98 paddingTop: 25, 98 paddingTop: 25,
242 return this.selectedFairwayAvailabilityFeature.properties.name; 242 return this.selectedFairwayAvailabilityFeature.properties.name;
243 } 243 }
244 }, 244 },
245 methods: { 245 methods: {
246 getDimensions({ svgHeight, svgWidth, main, nav }) { 246 getDimensions({ svgHeight, svgWidth, main, nav }) {
247 const mainMargin = main || { top: 0, right: 20, bottom: 75, left: 200 }; 247 const mainMargin = main || { top: 0, right: 20, bottom: 50, left: 20 };
248 const navMargin = nav || { 248 const navMargin = nav || {
249 top: svgHeight - mainMargin.top - 65, 249 top: svgHeight - mainMargin.top - 65,
250 right: 20, 250 right: 20,
251 bottom: 30, 251 bottom: 30,
252 left: 80 252 left: 80
301 offScreen.style.height = `${svgHeight}px`; 301 offScreen.style.height = `${svgHeight}px`;
302 this.renderTo({ 302 this.renderTo({
303 element: offScreen, 303 element: offScreen,
304 dimensions: this.getDimensions({ 304 dimensions: this.getDimensions({
305 svgWidth: svgWidth, 305 svgWidth: svgWidth,
306 svgHeight: svgHeight, 306 svgHeight: svgHeight
307 main: { top: 0, right: 20, bottom: 45, left: 20 }
308 }) 307 })
309 }); 308 });
310 var svg = offScreen.querySelector("svg"); 309 var svg = offScreen.querySelector("svg");
311 if (["topright", "bottomright"].indexOf(position) !== -1) { 310 if (["topright", "bottomright"].indexOf(position) !== -1) {
312 x = this.pdf.width - offset.x - width; 311 x = this.pdf.width - offset.x - width;