Skip to content

Commit 01edfce

Browse files
Merge pull request #1424 from OpenSignLabs/raktima-patch-11
fix: text type widgets space issue in mobile view
2 parents 5679668 + 9176b8f commit 01edfce

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

apps/OpenSign/src/components/pdf/Placeholder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ function Placeholder(props) {
834834
)}
835835
{isTabAndMobile ? (
836836
<div
837-
className="flex items-stretch"
837+
className="flex items-stretch justify-center"
838838
style={{
839839
left: xPos(props.pos, props.isSignYourself),
840840
top: yPos(props.pos, props.isSignYourself),

apps/OpenSign/src/constant/Utils.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -463,29 +463,29 @@ export const defaultWidthHeight = (type) => {
463463
case "stamp":
464464
return { width: 150, height: 60 };
465465
case "checkbox":
466-
return { width: 15, height: 17 };
466+
return { width: 15, height: 19 };
467467
case textInputWidget:
468-
return { width: 150, height: 17 };
468+
return { width: 150, height: 19 };
469469
case "dropdown":
470470
return { width: 120, height: 22 };
471471
case "initials":
472472
return { width: 50, height: 50 };
473473
case "name":
474-
return { width: 150, height: 17 };
474+
return { width: 150, height: 19 };
475475
case "company":
476-
return { width: 150, height: 17 };
476+
return { width: 150, height: 19 };
477477
case "job title":
478-
return { width: 150, height: 17 };
478+
return { width: 150, height: 19 };
479479
case "date":
480480
return { width: 100, height: 20 };
481481
case "image":
482482
return { width: 70, height: 70 };
483483
case "email":
484-
return { width: 150, height: 17 };
484+
return { width: 150, height: 19 };
485485
case radioButtonWidget:
486486
return { width: 5, height: 10 };
487487
case textWidget:
488-
return { width: 150, height: 17 };
488+
return { width: 150, height: 19 };
489489
default:
490490
return { width: 150, height: 60 };
491491
}

apps/OpenSign/src/pages/PlaceHolderSign.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,10 @@ function PlaceHolderSign() {
491491
let dropData = [];
492492
let placeHolder;
493493
const dragTypeValue = item?.text ? item.text : monitor.type;
494-
const widgetWidth = defaultWidthHeight(dragTypeValue).width;
495-
const widgetHeight = defaultWidthHeight(dragTypeValue).height;
494+
const widgetWidth =
495+
defaultWidthHeight(dragTypeValue).width * containerScale;
496+
const widgetHeight =
497+
defaultWidthHeight(dragTypeValue).height * containerScale;
496498
//adding and updating drop position in array when user drop signature button in div
497499
if (item === "onclick") {
498500
const divHeight = divRef.current.getBoundingClientRect().height;

0 commit comments

Comments
 (0)