fix: text box widgets font size issue

This commit is contained in:
RaktimaNXG
2024-10-03 20:36:34 +05:30
parent a5f8e4fc58
commit 08b83469e3
2 changed files with 4 additions and 4 deletions
@@ -31,7 +31,7 @@ function PlaceholderType(props) {
const years = range(1990, getYear(new Date()) + 16, 1);
const height = props.posHeight(props.pos, props.isSignYourself);
const fontSize =
(props.pos.options?.fontSize || (height > 14 ? 12 : height / 2)) + "px";
(props.pos.options?.fontSize || (height ? height - 4 : 12)) + "px";
const fontColor = props.pos.options?.fontColor || "black";
const months = [
"January",
+3 -3
View File
@@ -1290,7 +1290,7 @@ const calculateFontSize = (
widgetHeight
) => {
const font =
position?.options?.fontSize || widgetHeight > 14 ? 12 : widgetHeight / 2;
position?.options?.fontSize || (widgetHeight ? widgetHeight / 2 : 12);
if (!signyourself && position?.isMobile && position?.scale) {
return font / position?.scale / containerScale;
} else {
@@ -1487,7 +1487,7 @@ export const multiSignEmbed = async (
position,
containerScale,
signyourself,
widgetHeight
position.Height
);
parseInt(fontSize);
let textContent;
@@ -1662,7 +1662,7 @@ export const multiSignEmbed = async (
});
}
const pdfBytes = await pdfDoc.saveAsBase64({ useObjectStreams: false });
// console.log("pdf", pdfBytes);
//console.log("pdf", pdfBytes);
return pdfBytes;
};