Skip to content

Commit 16b9a37

Browse files
3.7.1
1 parent c40e174 commit 16b9a37

File tree

6 files changed

+21
-29
lines changed

6 files changed

+21
-29
lines changed

dist/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ declare class DocHandler {
3737
height: number;
3838
};
3939
scaleFactor(): number;
40-
get lineHeightFactor(): number;
40+
getLineHeightFactor(): number;
4141
getLineHeight(fontSize: number): number;
4242
pageNumber(): number;
4343
}

dist/jspdf.plugin.autotable.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
*
3-
* jsPDF AutoTable plugin v3.7.0
3+
* jsPDF AutoTable plugin v3.7.1
44
*
55
* Copyright (c) 2023 Simon Bengtsson, https://github.com/simonbengtsson/jsPDF-AutoTable
66
* Licensed under the MIT License.
@@ -736,16 +736,12 @@ var DocHandler = /** @class */ (function () {
736736
DocHandler.prototype.scaleFactor = function () {
737737
return this.jsPDFDocument.internal.scaleFactor;
738738
};
739-
Object.defineProperty(DocHandler.prototype, "lineHeightFactor", {
740-
get: function () {
741-
var doc = this.jsPDFDocument;
742-
return doc.getLineHeightFactor ? doc.getLineHeightFactor() : 1.15;
743-
},
744-
enumerable: false,
745-
configurable: true
746-
});
739+
DocHandler.prototype.getLineHeightFactor = function () {
740+
var doc = this.jsPDFDocument;
741+
return doc.getLineHeightFactor ? doc.getLineHeightFactor() : 1.15;
742+
};
747743
DocHandler.prototype.getLineHeight = function (fontSize) {
748-
return (fontSize / this.scaleFactor()) * this.lineHeightFactor;
744+
return (fontSize / this.scaleFactor()) * this.getLineHeightFactor();
749745
};
750746
DocHandler.prototype.pageNumber = function () {
751747
var pageInfo = this.jsPDFDocument.internal.getCurrentPageInfo();
@@ -1748,7 +1744,7 @@ function modifyRowToFit(row, remainingPageSpace, table, doc) {
17481744
remainderCell.text = cell.text.splice(remainingLineCount, cell.text.length);
17491745
}
17501746
var scaleFactor = doc.scaleFactor();
1751-
var lineHeightFactor = doc.lineHeightFactor;
1747+
var lineHeightFactor = doc.getLineHeightFactor();
17521748
cell.contentHeight = cell.getContentHeight(scaleFactor, lineHeightFactor);
17531749
if (cell.contentHeight >= remainingPageSpace) {
17541750
cell.contentHeight = remainingPageSpace;
@@ -2347,7 +2343,7 @@ function fitContent(table, doc) {
23472343
cell.text = result;
23482344
}
23492345
}
2350-
cell.contentHeight = cell.getContentHeight(doc.scaleFactor(), doc.lineHeightFactor);
2346+
cell.contentHeight = cell.getContentHeight(doc.scaleFactor(), doc.getLineHeightFactor());
23512347
var realContentHeight = cell.contentHeight / cell.rowSpan;
23522348
if (cell.rowSpan > 1 &&
23532349
rowSpanHeight.count * rowSpanHeight.height <

dist/jspdf.plugin.autotable.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jspdf.plugin.autotable.mjs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -612,16 +612,12 @@ var DocHandler = /** @class */ (function () {
612612
DocHandler.prototype.scaleFactor = function () {
613613
return this.jsPDFDocument.internal.scaleFactor;
614614
};
615-
Object.defineProperty(DocHandler.prototype, "lineHeightFactor", {
616-
get: function () {
617-
var doc = this.jsPDFDocument;
618-
return doc.getLineHeightFactor ? doc.getLineHeightFactor() : 1.15;
619-
},
620-
enumerable: false,
621-
configurable: true
622-
});
615+
DocHandler.prototype.getLineHeightFactor = function () {
616+
var doc = this.jsPDFDocument;
617+
return doc.getLineHeightFactor ? doc.getLineHeightFactor() : 1.15;
618+
};
623619
DocHandler.prototype.getLineHeight = function (fontSize) {
624-
return (fontSize / this.scaleFactor()) * this.lineHeightFactor;
620+
return (fontSize / this.scaleFactor()) * this.getLineHeightFactor();
625621
};
626622
DocHandler.prototype.pageNumber = function () {
627623
var pageInfo = this.jsPDFDocument.internal.getCurrentPageInfo();
@@ -1396,7 +1392,7 @@ function modifyRowToFit(row, remainingPageSpace, table, doc) {
13961392
remainderCell.text = cell.text.splice(remainingLineCount, cell.text.length);
13971393
}
13981394
var scaleFactor = doc.scaleFactor();
1399-
var lineHeightFactor = doc.lineHeightFactor;
1395+
var lineHeightFactor = doc.getLineHeightFactor();
14001396
cell.contentHeight = cell.getContentHeight(scaleFactor, lineHeightFactor);
14011397
if (cell.contentHeight >= remainingPageSpace) {
14021398
cell.contentHeight = remainingPageSpace;
@@ -1906,7 +1902,7 @@ function fitContent(table, doc) {
19061902
cell.text = result;
19071903
}
19081904
}
1909-
cell.contentHeight = cell.getContentHeight(doc.scaleFactor(), doc.lineHeightFactor);
1905+
cell.contentHeight = cell.getContentHeight(doc.scaleFactor(), doc.getLineHeightFactor());
19101906
var realContentHeight = cell.contentHeight / cell.rowSpan;
19111907
if (cell.rowSpan > 1 &&
19121908
rowSpanHeight.count * rowSpanHeight.height <

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jspdf-autotable",
3-
"version": "3.7.0",
3+
"version": "3.7.1",
44
"description": "Generate pdf tables with javascript (jsPDF plugin)",
55
"main": "dist/jspdf.plugin.autotable.js",
66
"exports": {

0 commit comments

Comments
 (0)