🚧 fixed field size

This commit is contained in:
Timur Ercan
2023-03-07 13:07:27 +01:00
parent abb9ea9997
commit 12eae1bd78
3 changed files with 5 additions and 11 deletions

View File

@ -53,18 +53,15 @@ export default function EditableField(props: FieldPropsType) {
e.stopPropagation(); e.stopPropagation();
}} }}
> >
{/* width: 192 height 96 */}
<div <div
hidden={props.hidden} hidden={props.hidden}
ref={nodeRef} ref={nodeRef}
className="cursor-move opacity-80 p-2 m-auto w-48 h-24 flex-row-reverse text-lg font-bold text-center absolute top-0 left-0 select-none" className="cursor-move opacity-80 p-2 m-auto w-48 h-16 flex-row-reverse text-lg font-bold text-center absolute top-0 left-0 select-none"
style={{ style={{
background: stc(props.field.Recipient.email), background: stc(props.field.Recipient.email),
}} }}
> >
<div className="mb-2 pointer-events-none">
<Logo className="w-16 mx-auto"></Logo>
</div>
{/* width: 192 height 96 */}
<div className="m-auto overflow-hidden flex-row-reverse text-lg font-bold text-center"> <div className="m-auto overflow-hidden flex-row-reverse text-lg font-bold text-center">
{field.type} {field.type}
{field.type === "SIGNATURE" ? ( {field.type === "SIGNATURE" ? (

View File

@ -43,15 +43,12 @@ export default function SignableField(props: FieldPropsType) {
if (!field?.signature) props.onClick(props.field); if (!field?.signature) props.onClick(props.field);
}} }}
ref={nodeRef} ref={nodeRef}
className="cursor-pointer opacity-80 p-2 m-auto w-auto flex-row-reverse text-lg font-bold text-center absolute top-0 left-0 select-none hover:brightness-50" className="cursor-pointer opacity-80 py-4 m-auto w-48 h-16 flex-row-reverse text-lg font-bold text-center absolute top-0 left-0 select-none hover:brightness-50"
style={{ style={{
background: stc(props.field.Recipient.email), background: stc(props.field.Recipient.email),
}} }}
> >
<div <div hidden={field?.signature} className="font-medium">
hidden={field?.signature}
className="m-auto w-auto flex-row-reverse font-medium text-center px-12 py-2"
>
{field.type === "SIGNATURE" ? "SIGN HERE" : ""} {field.type === "SIGNATURE" ? "SIGN HERE" : ""}
</div> </div>
<div <div

View File

@ -12,7 +12,7 @@ export async function insertImageInPDF(
const pages = pdfDoc.getPages(); const pages = pdfDoc.getPages();
const pdfPage = pages[page]; const pdfPage = pages[page];
const pngImage = await pdfDoc.embedPng(image); const pngImage = await pdfDoc.embedPng(image);
const drawSize = { width: 213, height: 50 }; const drawSize = { width: 192, height: 96 };
pdfPage.drawImage(pngImage, { pdfPage.drawImage(pngImage, {
x: positionX, x: positionX,