Skip to content

Commit

Permalink
Fix page height.
Browse files Browse the repository at this point in the history
  • Loading branch information
greinard committed Feb 27, 2024
1 parent 599598a commit 11b10d4
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export default function (props: AsthmaProviderReportProps) {
};

const onGeneratePdf = () => {
if (props.previewState || generatingPdf) return;
if (generatingPdf) return;

setGeneratingPdf(true);

Expand All @@ -227,7 +227,8 @@ export default function (props: AsthmaProviderReportProps) {

MyDataHelps.persistDeviceData([{type: 'ReportHtml', value: reportHtml}]).then(() => {
MyDataHelps.getDeviceInfo().then(function (deviceInfo) {
setDeviceInfo(deviceInfo);
// setDeviceInfo(deviceInfo);
setGeneratingPdf(false);
openPdf(deviceInfo);
});
});
Expand All @@ -237,7 +238,7 @@ export default function (props: AsthmaProviderReportProps) {
};

let documentWidth = 1224;
let documentHeight = 1580; // Should be 1584, but attempting to avoid running up to the bleeding edge.
let documentHeight = 1575; // Should be 1584, but attempting to avoid running up to the bleeding edge.
let scale = (window.innerWidth - 32) / documentWidth;

return <div style={{display: 'flex', justifyContent: 'center'}}>
Expand Down

0 comments on commit 11b10d4

Please sign in to comment.