Skip to content

🔥 The free & Open Source DocuSign alternative

Merge branch 'staging' into text-input

Raktimae286390aecae
diff --cc microfrontends/SignDocuments/src/utils/Utils.js
index 6f93e1237,573f29eb4..8721933d7
--- a/microfrontends/SignDocuments/src/utils/Utils.js
+++ b/microfrontends/SignDocuments/src/utils/Utils.js
@@@ -764,60 -767,60 +764,61 @@@ export const handleSignYourselfImageRes
key,
xyPostion,
index,
- setXyPostion
- setXyPostion,
++ setXyPostion,
++
) => {
- const updateFilter = xyPostion[index].pos.filter(
- (data) => data.key === key && data.Width && data.Height
- );
-
- if (updateFilter.length > 0) {
- const getXYdata = xyPostion[index].pos;
- const getPosData = getXYdata;
- const addSign = getPosData.map((url, ind) => {
- if (url.key === key) {
- return {
- ...url,
- Width: ref.offsetWidth,
- Height: ref.offsetHeight,
- IsResize: true
- };
- }
- return url;
- });
-
- const newUpdateUrl = xyPostion.map((obj, ind) => {
- if (ind === index) {
- return { ...obj, pos: addSign };
- }
- return obj;
- });
-
- setXyPostion(newUpdateUrl);
- } else {
- const getXYdata = xyPostion[index].pos;
-
- const getPosData = getXYdata;
+ // const updateFilter = xyPostion[index].pos.filter(
+ // (data) => data.key === key && data.Width && data.Height
+ // );
- const addSign = getPosData.map((url, ind) => {
- if (url.key === key) {
- return {
- ...url,
- Width: ref.offsetWidth,
- Height: ref.offsetHeight,
- IsResize: true
- };
- }
- return url;
- });
+ // if (updateFilter.length > 0) {
+ // const getXYdata = xyPostion[index].pos;
+ // const getPosData = getXYdata;
+ // const addSign = getPosData.map((url, ind) => {
+ // if (url.key === key) {
+ // return {
+ // ...url,
+ // Width: ref.offsetWidth,
+ // Height: ref.offsetHeight,
+ // IsResize: true
+ // };
+ // }
+ // return url;
+ // });
+
+ // const newUpdateUrl = xyPostion.map((obj, ind) => {
+ // if (ind === index) {
+ // return { ...obj, pos: addSign };
+ // }
+ // return obj;
+ // });
+
+ // setXyPostion(newUpdateUrl);
+ // } else {
+ const getXYdata = xyPostion[index].pos;
+
+ const getPosData = getXYdata;
+
+ const addSign = getPosData.map((url, ind) => {
+ if (url.key === key) {
+ return {
+ ...url,
+ Width: ref.offsetWidth,
+ Height: ref.offsetHeight,
+ IsResize: true
+ };
+ }
+ return url;
+ });
- const newUpdateUrl = xyPostion.map((obj, ind) => {
- if (ind === index) {
- return { ...obj, pos: addSign };
- }
- return obj;
- });
- setXyPostion(newUpdateUrl);
- }
+ const newUpdateUrl = xyPostion.map((obj, ind) => {
+ if (ind === index) {
+ return { ...obj, pos: addSign };
+ }
+ return obj;
+ });
+ setXyPostion(newUpdateUrl);
+ // }
};
//function for call cloud function signPdf and generate digital signature