This commit is contained in:
cuixiping
2020-01-07 21:12:54 +08:00
5 changed files with 19 additions and 19 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -219,7 +219,7 @@ const svgElementToPdf = function (element, pdf, options) {
} }
pdf.setFontType(fontType); pdf.setFontType(fontType);
const pdfFontSize = node.hasAttribute('font-size') const pdfFontSize = node.hasAttribute('font-size')
? parseInt(node.getAttribute('font-size'), 10) ? parseInt(node.getAttribute('font-size'))
: 16; : 16;
/** /**
@@ -255,8 +255,8 @@ const svgElementToPdf = function (element, pdf, options) {
case 'start': break; case 'start': break;
case 'default': node.setAttribute('text-anchor', 'start'); break; case 'default': node.setAttribute('text-anchor', 'start'); break;
} }
x = parseInt(node.getAttribute('x'), 10) - xOffset; x = parseInt(node.getAttribute('x')) - xOffset;
y = parseInt(node.getAttribute('y'), 10); y = parseInt(node.getAttribute('y'));
} }
// console.log('fontSize:', pdfFontSize, 'text:', node.textContent); // console.log('fontSize:', pdfFontSize, 'text:', node.textContent);
pdf.setFontSize(pdfFontSize).text( pdf.setFontSize(pdfFontSize).text(

12
package-lock.json generated
View File

@@ -3022,9 +3022,9 @@
"dev": true "dev": true
}, },
"core-js-bundle": { "core-js-bundle": {
"version": "3.6.1", "version": "3.6.2",
"resolved": "https://registry.npmjs.org/core-js-bundle/-/core-js-bundle-3.6.1.tgz", "resolved": "https://registry.npmjs.org/core-js-bundle/-/core-js-bundle-3.6.2.tgz",
"integrity": "sha512-jMQuu9R/WLLgNw0LNSSFw4wmDqlP2b/d5IG2xQeevMN0gJbUKVRyArJIKOgbgE3Q0PWxzGQr01lecQl/yhjoxA==", "integrity": "sha512-W1a9Uks77ZBboo7gHt7Gytd/zsIj4EL1Zfad01kJyCuodBY350S5v/9aoOEb+2ZDW8lKdcoeiZvx3FrC6GWN5Q==",
"dev": true "dev": true
}, },
"core-js-compat": { "core-js-compat": {
@@ -4378,9 +4378,9 @@
} }
}, },
"eslint-plugin-jsdoc": { "eslint-plugin-jsdoc": {
"version": "20.0.0", "version": "20.0.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-20.0.0.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-20.0.2.tgz",
"integrity": "sha512-JtQw5ctQmflpp3szNnAdyQkBKs4gfVC9Yjer9+g7e0F9l/hraQ4N2fBFUBSpWafpxz9TPV6aAUeYHjM6rHRxBw==", "integrity": "sha512-Acj6D4tUnmw4tfX0BhJlxRbjZbF8hPDY6RGSCIjPRUmayOi40NEHyGN6rSlGYkblBwD0Yd817mPdNKFhkdchiw==",
"dev": true, "dev": true,
"requires": { "requires": {
"comment-parser": "^0.7.2", "comment-parser": "^0.7.2",

View File

@@ -132,7 +132,7 @@
"babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3", "babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3",
"coffeescript": "^2.5.0", "coffeescript": "^2.5.0",
"copyfiles": "^2.1.1", "copyfiles": "^2.1.1",
"core-js-bundle": "^3.6.1", "core-js-bundle": "^3.6.2",
"coveradge": "^0.2.0", "coveradge": "^0.2.0",
"cypress": "^3.8.1", "cypress": "^3.8.1",
"cypress-axe": "^0.5.3", "cypress-axe": "^0.5.3",
@@ -147,7 +147,7 @@
"eslint-plugin-eslint-comments": "^3.1.2", "eslint-plugin-eslint-comments": "^3.1.2",
"eslint-plugin-html": "^6.0.0", "eslint-plugin-html": "^6.0.0",
"eslint-plugin-import": "^2.19.1", "eslint-plugin-import": "^2.19.1",
"eslint-plugin-jsdoc": "^20.0.0", "eslint-plugin-jsdoc": "^20.0.2",
"eslint-plugin-markdown": "^1.0.1", "eslint-plugin-markdown": "^1.0.1",
"eslint-plugin-no-unsanitized": "^3.0.2", "eslint-plugin-no-unsanitized": "^3.0.2",
"eslint-plugin-no-use-extend-native": "^0.4.1", "eslint-plugin-no-use-extend-native": "^0.4.1",