Skip to content

Commit

Permalink
Build with 'portrait' pdf fix
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed Nov 25, 2024
1 parent 047b7cf commit 9d5a193
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build/jsroot.js
Original file line number Diff line number Diff line change
Expand Up @@ -142334,18 +142334,20 @@ async function makePDF(svg, args) {

let doc;

const orientation = (svg.width < svg.height) ? 'portrait' : 'landscape';

if (args?.as_doc)
doc = args?.doc;

if (doc) {
doc.addPage({
orientation: 'landscape',
orientation,
unit: 'px',
format: [svg.width + 10, svg.height + 10]
});
} else {
doc = new jsPDF({
orientation: 'landscape',
orientation,
unit: 'px',
format: [svg.width + 10, svg.height + 10]
});
Expand Down

0 comments on commit 9d5a193

Please sign in to comment.