1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00

Merge pull request #19511 from calixteman/editor_dnd_image

[Editor] Wait for switching to stamp mode before adding a new editor when dnd'ing an image
This commit is contained in:
calixteman 2025-02-18 13:16:30 +01:00 committed by GitHub
commit a857ca3261
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -621,9 +621,9 @@ class AnnotationEditorLayer {
* @param {number} mode
* @param {Object} params
*/
pasteEditor(mode, params) {
async pasteEditor(mode, params) {
this.#uiManager.updateToolbar(mode);
this.#uiManager.updateMode(mode);
await this.#uiManager.updateMode(mode);
const { offsetX, offsetY } = this.#getCenterPoint();
const id = this.getNextId();