From c61be7c35b1f9e7713f1a477572c36f67dd53f0f Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Mon, 1 Apr 2024 15:38:06 +0530 Subject: [PATCH 01/88] fix: all text type fields similar to text widget --- .../src/components/pdf/Placeholder.js | 10 +- .../src/components/pdf/PlaceholderType.js | 196 +++++++++++++++--- apps/OpenSign/src/constant/Utils.js | 41 ++-- apps/OpenSignServer/test.pdf | Bin 29225 -> 164324 bytes 4 files changed, 197 insertions(+), 50 deletions(-) diff --git a/apps/OpenSign/src/components/pdf/Placeholder.js b/apps/OpenSign/src/components/pdf/Placeholder.js index 29ee1eca4e..0ecc29a5f0 100644 --- a/apps/OpenSign/src/components/pdf/Placeholder.js +++ b/apps/OpenSign/src/components/pdf/Placeholder.js @@ -542,7 +542,15 @@ function Placeholder(props) { data-tut={props.pos.key === props.unSignedWidgetId ? "IsSigned" : ""} key={props.pos.key} lockAspectRatio={ - props.pos.type !== textWidget && + // props.pos.type !== textWidget + ![ + textWidget, + "email", + "name", + "company", + "job title", + textInputWidget + ].includes(props.pos.type) && (props.pos.Width ? props.pos.Width / props.pos.Height : defaultWidthHeight(props.pos.type).width / diff --git a/apps/OpenSign/src/components/pdf/PlaceholderType.js b/apps/OpenSign/src/components/pdf/PlaceholderType.js index 58bdd0f143..f808e3e96b 100644 --- a/apps/OpenSign/src/components/pdf/PlaceholderType.js +++ b/apps/OpenSign/src/components/pdf/PlaceholderType.js @@ -288,7 +288,7 @@ function PlaceholderType(props) { }; //handle height on enter press in text area const handleEnterPress = (e) => { - const height = 15; + const height = 18; if (e.key === "Enter") { //function to save height of text area onChangeHeightOfTextArea( @@ -403,19 +403,39 @@ function PlaceholderType(props) { case textInputWidget: return props.isSignYourself || (props.isNeedSign && props.data?.signerObjId === props.signerObjId) ? ( - { + // setTextValue(e.target.value); + // onChangeInput( + // e.target.value, + // props.pos.key, + // props.xyPostion, + // props.index, + // props.setXyPostion, + // props.data && props.data?.Id, + // false + // ); + // }} + // /> +