comparison client/src/components/fairway/AvailableFairwayDepth.vue @ 3917:be0deb139518

available_fairwaydepth: hotfix for margins
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 11 Jul 2019 14:43:30 +0200
parents 9440d2922097
children 1e837d86bead
comparison
equal deleted inserted replaced
3916:c76bbd27f89c 3917:be0deb139518
241 if (this.selectedFairwayAvailabilityFeature == null) return ""; 241 if (this.selectedFairwayAvailabilityFeature == null) return "";
242 return this.selectedFairwayAvailabilityFeature.properties.name; 242 return this.selectedFairwayAvailabilityFeature.properties.name;
243 } 243 }
244 }, 244 },
245 methods: { 245 methods: {
246 getDimensions({ svgHeight, svgWidth }) { 246 getDimensions({ svgHeight, svgWidth, main, nav }) {
247 const mainMargin = { top: 0, right: 20, bottom: 75, left: 200 }; 247 const mainMargin = main || { top: 0, right: 20, bottom: 75, left: 200 };
248 const navMargin = { 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
253 }; 253 };
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 }
307 }) 308 })
308 }); 309 });
309 var svg = offScreen.querySelector("svg"); 310 var svg = offScreen.querySelector("svg");
310 if (["topright", "bottomright"].indexOf(position) !== -1) { 311 if (["topright", "bottomright"].indexOf(position) !== -1) {
311 x = this.pdf.width - offset.x - width; 312 x = this.pdf.width - offset.x - width;