fix: unsigned widget's reactour message

This commit is contained in:
RaktimaNXG
2024-02-21 09:40:31 +05:30
parent 439ac7eac6
commit d4fabf0fe9
5 changed files with 25 additions and 127 deletions
@@ -1294,114 +1294,6 @@ export const signPdfFun = async (
) => {
let singleSign;
// const newWidth = containerWH.width;
// const scale = isMobile ? pdfOriginalWidth / newWidth : 1;
// if (signerData && signerData.length === 1 && signerData[0].pos.length === 1) {
// const height = xyPosData.Height ? xyPosData.Height : 60;
// const xPos = (pos) => {
// const resizePos = pos.xPosition;
// //checking both condition mobile and desktop view
// if (isMobile) {
// //if pos.isMobile false -- placeholder saved from desktop view then handle position in mobile view divided by scale
// if (pos.isMobile) {
// const x = resizePos * (pos.scale / scale);
// return x * scale;
// } else {
// const x = resizePos / scale;
// return x * scale;
// }
// } else {
// //else if pos.isMobile true -- placeholder saved from mobile or tablet view then handle position in desktop view divide by scale
// if (pos.isMobile) {
// const x = resizePos * pos.scale;
// return x;
// } else {
// return resizePos;
// }
// }
// };
// const yBottom = (pos) => {
// const resizePos = pos.yBottom;
// let yPosition;
// //checking both condition mobile and desktop view
// if (isMobile) {
// //if pos.isMobile false -- placeholder saved from desktop view then handle position in mobile view divided by scale
// if (pos.isMobile) {
// const y = resizePos * (pos.scale / scale);
// yPosition = pos.isDrag
// ? y * scale - height * scale
// : pos.firstYPos
// ? y * scale - height * scale + pos.firstYPos
// : y * scale - height * scale;
// return yPosition;
// } else {
// const y = resizePos / scale;
// if (pos.IsResize) {
// yPosition = pos.isDrag
// ? y * scale - height * scale
// : pos.firstYPos
// ? y * scale - height * scale + pos.firstYPos
// : y * scale - height * scale;
// return yPosition;
// } else {
// yPosition = pos.isDrag
// ? y * scale - height
// : pos.firstYPos
// ? y * scale - height + pos.firstYPos
// : y * scale - height;
// return yPosition;
// }
// }
// } else {
// //else if pos.isMobile true -- placeholder saved from mobile or tablet view then handle position in desktop view divide by scale
// if (pos.isMobile) {
// const y = resizePos * pos.scale;
// if (pos.IsResize) {
// yPosition = pos.isDrag
// ? y - height
// : pos.firstYPos
// ? y - height + pos.firstYPos
// : y - height;
// return yPosition;
// } else {
// yPosition = pos.isDrag
// ? y - height * pos.scale
// : pos.firstYPos
// ? y - height * pos.scale + pos.firstYPos
// : y - height * pos.scale;
// return yPosition;
// }
// } else {
// yPosition = pos.isDrag
// ? resizePos - height
// : pos.firstYPos
// ? resizePos - height + pos.firstYPos
// : resizePos - height;
// return yPosition;
// }
// }
// };
// singleSign = {
// pdfFile: pdfBase64Url,
// docId: documentId,
// userId: signerObjectId,
// sign: {
// Base64: base64Url,
// Left: xPos(xyPosData),
// Bottom: yBottom(xyPosData),
// Width: placeholderWidth(xyPosData, scale),
// Height: placeholderHeight(xyPosData, scale),
// Page: pageNo
// }
// };
// } else if (
// signerData &&
// signerData.length > 0 &&
// signerData[0].pos.length > 0
// ) {
singleSign = {
pdfFile: base64Url,
docId: documentId,