1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 17:48:07 +02:00

[Editor] Refactor dragging and dropping an editor (bugs 1802895, 1844618)

It'll help to have a full control on what's happening when moving an editor.
This commit is contained in:
Calixte Denizet 2023-08-02 20:08:09 +02:00
parent 0725b6299f
commit b59b1a81a9
11 changed files with 170 additions and 75 deletions

View file

@ -194,3 +194,11 @@ function serializeBitmapDimensions(page) {
});
}
exports.serializeBitmapDimensions = serializeBitmapDimensions;
async function dragAndDropAnnotation(page, startX, startY, tX, tY) {
await page.mouse.move(startX, startY);
await page.mouse.down();
await page.mouse.move(startX + tX, startY + tY);
await page.mouse.up();
}
exports.dragAndDropAnnotation = dragAndDropAnnotation;