- Build: Update with namespaced parseFloat, etc. changes

- npm: Update devDeps. (remove axe-core now that bundled with cypress-axe)
This commit is contained in:
Brett Zamir
2020-03-31 00:25:54 +08:00
parent 7914f26e02
commit ea58adbab1
19 changed files with 619 additions and 465 deletions

View File

@@ -258,7 +258,7 @@
}
return bits.map(function (b) {
return parseInt(b);
return Number.parseInt(b);
});
}
}, {
@@ -271,7 +271,7 @@
}
return bits.map(function (b) {
return parseInt(b, 16);
return Number.parseInt(b, 16);
});
}
}, {
@@ -284,7 +284,7 @@
}
return bits.map(function (b) {
return parseInt(b + b, 16);
return Number.parseInt(b + b, 16);
});
}
}];
@@ -742,7 +742,7 @@
}
if (attributeIsNotEmpty(node, 'stroke-width')) {
pdf.setLineWidth(k * parseInt(node.getAttribute('stroke-width')));
pdf.setLineWidth(k * Number.parseInt(node.getAttribute('stroke-width')));
}
var strokeColor = node.getAttribute('stroke');
@@ -776,22 +776,22 @@
break;
case 'line':
pdf.line(k * parseInt(node.getAttribute('x1')), k * parseInt(node.getAttribute('y1')), k * parseInt(node.getAttribute('x2')), k * parseInt(node.getAttribute('y2')));
pdf.line(k * Number.parseInt(node.getAttribute('x1')), k * Number.parseInt(node.getAttribute('y1')), k * Number.parseInt(node.getAttribute('x2')), k * Number.parseInt(node.getAttribute('y2')));
removeAttributes(node, pdfSvgAttr.line);
break;
case 'rect':
pdf.rect(k * parseInt(node.getAttribute('x')), k * parseInt(node.getAttribute('y')), k * parseInt(node.getAttribute('width')), k * parseInt(node.getAttribute('height')), colorMode);
pdf.rect(k * Number.parseInt(node.getAttribute('x')), k * Number.parseInt(node.getAttribute('y')), k * Number.parseInt(node.getAttribute('width')), k * Number.parseInt(node.getAttribute('height')), colorMode);
removeAttributes(node, pdfSvgAttr.rect);
break;
case 'ellipse':
pdf.ellipse(k * parseInt(node.getAttribute('cx')), k * parseInt(node.getAttribute('cy')), k * parseInt(node.getAttribute('rx')), k * parseInt(node.getAttribute('ry')), colorMode);
pdf.ellipse(k * Number.parseInt(node.getAttribute('cx')), k * Number.parseInt(node.getAttribute('cy')), k * Number.parseInt(node.getAttribute('rx')), k * Number.parseInt(node.getAttribute('ry')), colorMode);
removeAttributes(node, pdfSvgAttr.ellipse);
break;
case 'circle':
pdf.circle(k * parseInt(node.getAttribute('cx')), k * parseInt(node.getAttribute('cy')), k * parseInt(node.getAttribute('r')), colorMode);
pdf.circle(k * Number.parseInt(node.getAttribute('cx')), k * Number.parseInt(node.getAttribute('cy')), k * Number.parseInt(node.getAttribute('r')), colorMode);
removeAttributes(node, pdfSvgAttr.circle);
break;
@@ -892,7 +892,7 @@
}
pdf.setFontType(fontType);
var pdfFontSize = node.hasAttribute('font-size') ? parseInt(node.getAttribute('font-size')) : 16;
var pdfFontSize = node.hasAttribute('font-size') ? Number.parseInt(node.getAttribute('font-size')) : 16;
/**
*
* @param {Element} elem
@@ -948,8 +948,8 @@
break;
}
x = parseInt(node.getAttribute('x')) - xOffset;
y = parseInt(node.getAttribute('y'));
x = Number.parseInt(node.getAttribute('x')) - xOffset;
y = Number.parseInt(node.getAttribute('y'));
} // console.log('fontSize:', pdfFontSize, 'text:', node.textContent);