mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
[Editor] Make sure everything is cleaned up when we switch to annotation editor mode
This commit is contained in:
parent
bdcc4a0feb
commit
68175323f1
2 changed files with 16 additions and 14 deletions
|
@ -135,6 +135,7 @@ function getSelector(id) {
|
|||
async function getRect(page, selector) {
|
||||
// In Chrome something is wrong when serializing a `DomRect`,
|
||||
// so we extract the values and return them ourselves.
|
||||
await page.waitForSelector(selector);
|
||||
return page.$eval(selector, el => {
|
||||
const { x, y, width, height } = el.getBoundingClientRect();
|
||||
return { x, y, width, height };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue