Skip to content

Commit

Permalink
fix: adjust canvas positioning in pagetrimmer for better layout control
Browse files Browse the repository at this point in the history
  • Loading branch information
tamuratak committed Jan 20, 2025
1 parent 76151fd commit 54a6468
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion viewer/components/pagetrimmer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const trimRule15 = { trimValue: 0.15, sheet: new CSSStyleSheet() } as const
const trimValueAndSheet = [trimRule05, trimRule10, trimRule15] as const
trimValueAndSheet.forEach(({ trimValue, sheet }) => {
const left = -100 * trimValue
sheet.insertRule(`.page canvas { left: ${left}%; position: relative; }`)
sheet.insertRule(`:is(.pdfViewer .canvasWrapper) canvas { left: ${left}%; position: relative; }`)
sheet.insertRule(`.page .textLayer { left: ${left}%; }`)
sheet.insertRule(`.page .annotationLayer { left: ${left}%; }`)
sheet.disabled = true
Expand Down

0 comments on commit 54a6468

Please sign in to comment.