mirror of
https://github.com/lllin000/PaperForge.git
synced 2026-07-22 06:50:53 +00:00
fix: use pageEl bounding rect instead of canvas for create conversion
This commit is contained in:
parent
be7e0eab92
commit
7baf7a7548
1 changed files with 1 additions and 1 deletions
|
|
@ -812,7 +812,7 @@ function setupSelectionCapture(containerEl, vaultPath, pdfPath) {
|
|||
var ar = cv.clientWidth / cv.clientHeight;
|
||||
if (ar > 0.65 && ar < 0.75) { pdfW = 595; pdfH = 842; }
|
||||
}
|
||||
var cvRect = cv ? cv.getBoundingClientRect() : containerEl.getBoundingClientRect();
|
||||
var cvRect = pageEl.getBoundingClientRect();
|
||||
var zoomX = pdfW / cvRect.width, zoomY = pdfH / cvRect.height;
|
||||
// Compute per-line rects using getClientRects for shaped highlights
|
||||
var clientRects = range.getClientRects();
|
||||
|
|
|
|||
Loading…
Reference in a new issue