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:
parent
717c766a42
commit
a8867cf68a
7 changed files with 105 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue