1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

[Editor] Avoid to have some part of an editor outside its page (bug 1843303)

This commit is contained in:
Calixte Denizet 2023-07-13 18:31:08 +02:00
parent 717c766a42
commit a8867cf68a
7 changed files with 105 additions and 5 deletions

View file

@ -161,7 +161,12 @@ function getEditorDimensions(page, id) {
return page.evaluate(n => {
const element = document.getElementById(`pdfjs_internal_editor_${n}`);
const { style } = element;
return { width: style.width, height: style.height };
return {
left: style.left,
top: style.top,
width: style.width,
height: style.height,
};
}, id);
}
exports.getEditorDimensions = getEditorDimensions;