mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-23 16:12:34 +02:00
resolve conflict
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1214,8 +1214,8 @@ export const fetchImageBase64 = async (imageUrl) => {
|
||||
};
|
||||
//function for select image and upload image
|
||||
export const changeImageWH = async (base64Image) => {
|
||||
const newWidth = 100;
|
||||
const newHeight = 40;
|
||||
const newWidth = 300;
|
||||
const newHeight = 120;
|
||||
return new Promise((resolve, reject) => {
|
||||
const img = new Image();
|
||||
img.src = base64Image;
|
||||
@@ -1408,7 +1408,7 @@ export const multiSignEmbed = async (
|
||||
width: checkboxSize,
|
||||
height: checkboxSize
|
||||
};
|
||||
checkboxObj = getImagePosition(page, checkboxObj, 1);
|
||||
checkboxObj = getWidgetPosition(page, checkboxObj, 1);
|
||||
checkbox.addToPage(page, checkboxObj);
|
||||
|
||||
//applied which checkbox should be checked
|
||||
@@ -1533,10 +1533,10 @@ export const multiSignEmbed = async (
|
||||
width: widgetWidth,
|
||||
height: widgetHeight
|
||||
};
|
||||
|
||||
const dropdownOption = getImagePosition(page, dropdownObj, 1);
|
||||
// page.drawImage(img, imageOptions);
|
||||
dropdown.addToPage(page, dropdownOption);
|
||||
dropdown.defaultUpdateAppearances(font);
|
||||
const dropdownOption = getWidgetPosition(page, dropdownObj, 1);
|
||||
const dropdownSelected = { ...dropdownOption, font: font };
|
||||
dropdown.addToPage(page, dropdownSelected);
|
||||
dropdown.enableReadOnly();
|
||||
} else if (position.type === radioButtonWidget) {
|
||||
const radioRandomId = "radio" + randomId();
|
||||
@@ -1577,7 +1577,7 @@ export const multiSignEmbed = async (
|
||||
height: radioSize
|
||||
};
|
||||
|
||||
radioObj = getImagePosition(page, radioObj, 1);
|
||||
radioObj = getWidgetPosition(page, radioObj, 1);
|
||||
radioGroup.addOptionToPage(item, page, radioObj);
|
||||
});
|
||||
}
|
||||
@@ -1595,7 +1595,7 @@ export const multiSignEmbed = async (
|
||||
height: widgetHeight
|
||||
};
|
||||
|
||||
const imageOptions = getImagePosition(page, signature, 1);
|
||||
const imageOptions = getWidgetPosition(page, signature, 1);
|
||||
page.drawImage(img, imageOptions);
|
||||
}
|
||||
});
|
||||
@@ -2198,8 +2198,8 @@ function compensateRotation(
|
||||
}
|
||||
}
|
||||
|
||||
// `getImagePosition` is used to calulcate position of image type widget like x, y, width, height for pdf-lib
|
||||
function getImagePosition(page, image, sizeRatio) {
|
||||
// `getWidgetPosition` is used to calulcate position of image type widget like x, y, width, height for pdf-lib
|
||||
function getWidgetPosition(page, image, sizeRatio) {
|
||||
let pageWidth;
|
||||
// pageHeight;
|
||||
if ([90, 270].includes(page.getRotation().angle)) {
|
||||
|
||||
Reference in New Issue
Block a user