Merge pull request #1424 from OpenSignLabs/raktima-patch-11

fix: text type widgets space issue in mobile view
This commit is contained in:
prafull-opensignlabs
2024-11-07 16:40:13 +05:30
committed by GitHub
3 changed files with 12 additions and 10 deletions
@@ -834,7 +834,7 @@ function Placeholder(props) {
)}
{isTabAndMobile ? (
<div
className="flex items-stretch"
className="flex items-stretch justify-center"
style={{
left: xPos(props.pos, props.isSignYourself),
top: yPos(props.pos, props.isSignYourself),
+7 -7
View File
@@ -463,29 +463,29 @@ export const defaultWidthHeight = (type) => {
case "stamp":
return { width: 150, height: 60 };
case "checkbox":
return { width: 15, height: 17 };
return { width: 15, height: 19 };
case textInputWidget:
return { width: 150, height: 17 };
return { width: 150, height: 19 };
case "dropdown":
return { width: 120, height: 22 };
case "initials":
return { width: 50, height: 50 };
case "name":
return { width: 150, height: 17 };
return { width: 150, height: 19 };
case "company":
return { width: 150, height: 17 };
return { width: 150, height: 19 };
case "job title":
return { width: 150, height: 17 };
return { width: 150, height: 19 };
case "date":
return { width: 100, height: 20 };
case "image":
return { width: 70, height: 70 };
case "email":
return { width: 150, height: 17 };
return { width: 150, height: 19 };
case radioButtonWidget:
return { width: 5, height: 10 };
case textWidget:
return { width: 150, height: 17 };
return { width: 150, height: 19 };
default:
return { width: 150, height: 60 };
}
+4 -2
View File
@@ -491,8 +491,10 @@ function PlaceHolderSign() {
let dropData = [];
let placeHolder;
const dragTypeValue = item?.text ? item.text : monitor.type;
const widgetWidth = defaultWidthHeight(dragTypeValue).width;
const widgetHeight = defaultWidthHeight(dragTypeValue).height;
const widgetWidth =
defaultWidthHeight(dragTypeValue).width * containerScale;
const widgetHeight =
defaultWidthHeight(dragTypeValue).height * containerScale;
//adding and updating drop position in array when user drop signature button in div
if (item === "onclick") {
const divHeight = divRef.current.getBoundingClientRect().height;