@kne/react-pdf-sign 1.1.2 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +10 -6
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -499,13 +499,15 @@ const computedPDFSignLocation = ({
|
|
|
499
499
|
}) => {
|
|
500
500
|
const scaleX = size.width / size.originalWidth;
|
|
501
501
|
const scaleY = size.height / size.originalHeight;
|
|
502
|
-
const pdfX = Math.round(location.size.x
|
|
503
|
-
const pdfY = Math.round(size.originalHeight - location.size.y
|
|
504
|
-
const signWidth = Math.round(location.size.width
|
|
505
|
-
const signHeight = Math.round(location.size.height
|
|
502
|
+
const pdfX = Math.round(location.size.x);
|
|
503
|
+
const pdfY = Math.round(size.originalHeight - location.size.y);
|
|
504
|
+
const signWidth = Math.round(location.size.width);
|
|
505
|
+
const signHeight = Math.round(location.size.height);
|
|
506
506
|
return {
|
|
507
507
|
scaleX,
|
|
508
508
|
scaleY,
|
|
509
|
+
pageWidth: size.originalWidth,
|
|
510
|
+
pageHeight: size.originalHeight,
|
|
509
511
|
pdfX,
|
|
510
512
|
pdfY,
|
|
511
513
|
width: signWidth,
|
|
@@ -3944,9 +3946,10 @@ const PDFSignMultiInner = /*#__PURE__*/forwardRef(({
|
|
|
3944
3946
|
});
|
|
3945
3947
|
}
|
|
3946
3948
|
}));
|
|
3949
|
+
const scale = size.width / size.originalWidth;
|
|
3947
3950
|
return /*#__PURE__*/jsx("div", {
|
|
3948
3951
|
style: {
|
|
3949
|
-
transform: `scale(${
|
|
3952
|
+
transform: `scale(${scale})`,
|
|
3950
3953
|
transformOrigin: '0 0'
|
|
3951
3954
|
},
|
|
3952
3955
|
children: /*#__PURE__*/jsx(LocationGroup, {
|
|
@@ -4095,6 +4098,7 @@ const Signature = withLocale(({
|
|
|
4095
4098
|
message.error(formatMessage({
|
|
4096
4099
|
id: 'signatureEmptyError'
|
|
4097
4100
|
}));
|
|
4101
|
+
setLoading(false);
|
|
4098
4102
|
return;
|
|
4099
4103
|
}
|
|
4100
4104
|
let result = signatureCanvasRef.current.toDataURL('image/png');
|
|
@@ -4185,5 +4189,5 @@ const useSignature = () => {
|
|
|
4185
4189
|
};
|
|
4186
4190
|
};
|
|
4187
4191
|
|
|
4188
|
-
export { LocationGroup, LocationLayer, PDFSign, PDFSignMulti, PDFViewer, PDFSign as default, signPdfFile, useSignature };
|
|
4192
|
+
export { LocationGroup, LocationLayer, PDFSign, PDFSignMulti, PDFViewer, PDFSign as default, signMultiPdfFile, signPdfFile, useSignature };
|
|
4189
4193
|
//# sourceMappingURL=index.modern.js.map
|