1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

[Editor] Wait for switching to stamp mode before adding a new editor when dnd'ing an image

When dnd'ing an image with the FreeText mode enabled, the image wasn't correctly added.
This commit is contained in:
Calixte Denizet 2025-02-18 10:53:27 +01:00
parent 203452c170
commit 9984afe6a6

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();