fix: horizontal pdf or large size pdf's scrollbar issue in signyourself and placeholder flow

This commit is contained in:
RaktimaNXG
2023-11-30 14:12:25 +05:30
parent 3c54f2287c
commit 411941d9f7
5 changed files with 44 additions and 38 deletions
@@ -18,7 +18,8 @@ import {
getBase64FromUrl,
urlValidator,
multiSignEmbed,
embedDocId
embedDocId,
pdfNewWidthFun
} from "../utils/Utils";
import Loader from "./component/loader";
import HandleError from "./component/HandleError";
@@ -92,19 +93,14 @@ function PdfRequestFiles() {
const jsonSender = JSON.parse(senderUser);
useEffect(() => {
const clientWidth = window.innerWidth;
const value = docId ? 80 : 30;
const pdfWidth = clientWidth - 160 - 200 - value;
//160 is width of left side, 200 is width of right side component and 50 is space of middle compoent
//pdf from left and right component
setPdfNewWidth(pdfWidth);
if (documentId) {
getDocumentDetails();
}
}, []);
useEffect(() => {
if (divRef.current) {
const pdfWidth = pdfNewWidthFun(divRef);
setPdfNewWidth(pdfWidth);
setContainerWH({
width: divRef.current.offsetWidth,
height: divRef.current.offsetHeight