Skip to content

Commit f9b7633

Browse files
committed
reduced table sizes to fit on report
1 parent 834719f commit f9b7633

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

client/src/components/watershed/WatershedReport.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,6 @@ const resizeS3ForPDF = (elements) => {
429429
const resizeTablesForPDF = (clonedDoc) => {
430430
// target only the legend tables (add more selectors if needed)
431431
const targets = [
432-
{ sel: '.monthly-hydrology-table', max: 700 },
433432
{ sel: '.hydrologic-tabular-data', max: 700 },
434433
{ sel: '.monthly-hydrology-legend', max: 300 }
435434
];
@@ -511,8 +510,7 @@ const pdfDownload = async () => {
511510
// Convert first element to PDF
512511
worker = worker.toPdf();
513512
// Add subsequent elements
514-
let i = 1;
515-
for (i = 1; i < elements.length; i++) {
513+
for (let i = 1; i < elements.length; i++) {
516514
worker = worker
517515
.get('pdf')
518516
.then(pdf => {
@@ -624,11 +622,12 @@ const pdfDownload = async () => {
624622
}
625623
626624
.monthly-hydrology-table {
627-
font-size: 8px !important;
628625
overflow-x: hidden;
629626
630-
td {
631-
word-wrap: break-word;
627+
table {
628+
td {
629+
font-size: 7px !important;
630+
}
632631
}
633632
}
634633

client/src/components/watershed/report/MonthlyHydrologyTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
v-if="+props.monthlyHydrology.waterLicenceMonthlyDisplay[idx] > 9999"
3737
:title="props.monthlyHydrology.waterLicenceMonthlyDisplay[idx]"
3838
>
39-
{{ (+props.monthlyHydrology.waterLicenceMonthlyDisplay[idx]).toExponential(2).substring(0, 4) }} x 10<sup>{{ (+props.monthlyHydrology.waterLicenceMonthlyDisplay[idx]).toExponential(2).substring(6, (+props.monthlyHydrology.waterLicenceMonthlyDisplay[idx]).toExponential(2).length) }}</sup>
39+
{{ (+props.monthlyHydrology.waterLicenceMonthlyDisplay[idx]).toExponential(2).substring(0, 4) }}x10<sup>{{ (+props.monthlyHydrology.waterLicenceMonthlyDisplay[idx]).toExponential(2).substring(6, (+props.monthlyHydrology.waterLicenceMonthlyDisplay[idx]).toExponential(2).length) }}</sup>
4040
</span>
4141

4242
<span

0 commit comments

Comments
 (0)