mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Remove waitForTimeout
usage from the dragAndDropAnnotation
helper function
The timeout was introduced in commit402e3fe
with equal timeouts around the helper function call. In commit55e5af2
the timeouts around the helper function call have been removed, and it looks like the helper function itself was not updated purely due to an oversight. The operations here should not require any timeouts because the promises only resolve once the action is completed, which also explains why removing the timeouts surrounding the helper function calls went without any problems. It should therefore be safe to remove this timeout too.
This commit is contained in:
parent
3f51da147c
commit
c2e9a6264c
1 changed files with 0 additions and 2 deletions
|
@ -355,8 +355,6 @@ async function serializeBitmapDimensions(page) {
|
|||
async function dragAndDropAnnotation(page, startX, startY, tX, tY) {
|
||||
await page.mouse.move(startX, startY);
|
||||
await page.mouse.down();
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
await waitForTimeout(10);
|
||||
await page.mouse.move(startX + tX, startY + tY);
|
||||
await page.mouse.up();
|
||||
await page.waitForSelector("#viewer:not(.noUserSelect)");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue