Skip to content

Commit

Permalink
fix(pro): PDF.js text layer position incorrect when screen is scrolled
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiichi3227 committed Feb 19, 2025
1 parent 41f5da6 commit 5785dad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/static/templ/pro.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
j_canvas.attr('width', viewport.width);
j_canvas.attr('height', viewport.height);
j_div.addClass('textLayer');
j_div.offset({'top': offset.top, 'left': offset.left});
j_div.offset({'top': offset.top + window.scrollY, 'left': offset.left + window.scrollX});
j_div[0].style.setProperty('--scale-factor', viewport.scale);

j_page.append(j_div);
Expand Down

0 comments on commit 5785dad

Please sign in to comment.