Skip to content

Commit b701d28

Browse files
Merge pull request #295 from OpenSignLabs/text-input
2 parents 506ca35 + cf47093 commit b701d28

File tree

6 files changed

+310
-100
lines changed

6 files changed

+310
-100
lines changed

microfrontends/SignDocuments/src/Component/PdfRequestFiles.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,10 @@ function PdfRequestFiles() {
524524
};
525525

526526
//function for save button to save signature or image url
527-
const saveSign = (isDefaultSign) => {
527+
const saveSign = (isDefaultSign, width, height) => {
528+
const isTypeText = width && height ? true : false;
528529
const signatureImg = isDefaultSign ? defaultSignImg : signature;
529-
let imgWH = { width: "", height: "" };
530+
let imgWH = { width: width ? width : "", height: height ? height : "" };
530531
setIsSignPad(false);
531532
setIsImageSelect(false);
532533
setImage();
@@ -560,7 +561,8 @@ function PdfRequestFiles() {
560561
signKey,
561562
signatureImg,
562563
imgWH,
563-
isDefaultSign
564+
isDefaultSign,
565+
isTypeText
564566
);
565567

566568
const updateSignerData = currentSigner.map((obj, ind) => {

microfrontends/SignDocuments/src/Component/SignYourselfPdf.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -660,10 +660,10 @@ function SignYourSelf() {
660660
};
661661

662662
//function for save button to save signature or image url
663-
const saveSign = (isDefaultSign) => {
663+
const saveSign = (isDefaultSign, width, height) => {
664+
const isTypeText = width && height ? true : false;
664665
const signatureImg = isDefaultSign ? defaultSignImg : signature;
665-
666-
let imgWH = { width: "", height: "" };
666+
let imgWH = { width: width ? width : "", height: height ? height : "" };
667667
setIsSignPad(false);
668668
setIsImageSelect(false);
669669
setImage();
@@ -684,7 +684,8 @@ function SignYourSelf() {
684684
signKey,
685685
signatureImg,
686686
imgWH,
687-
isDefaultSign
687+
isDefaultSign,
688+
isTypeText
688689
);
689690

690691
setXyPostion(getUpdatePosition);

0 commit comments

Comments
 (0)