mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-06 17:57:39 +02:00
fix: text box widgets font size issue
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user