mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-08 02:37:40 +02:00
fix: horizontal pdf or large size pdf's scrollbar issue in signyourself and placeholder flow
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user