From f8ea63606c7b73d5df9cfd92efb02d15d69519b0 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Wed, 20 Aug 2025 17:18:38 +0200 Subject: [PATCH] [Editor] Move the comment button just before the delete one --- src/display/editor/editor.js | 2 +- src/display/editor/toolbar.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/display/editor/editor.js b/src/display/editor/editor.js index a032bcd17..3c58ba1f3 100644 --- a/src/display/editor/editor.js +++ b/src/display/editor/editor.js @@ -1078,13 +1078,13 @@ class AnnotationEditor { } this._editToolbar = new EditorToolbar(this); this.div.append(this._editToolbar.render()); - this._editToolbar.addButton("comment", this.addCommentButton()); const { toolbarButtons } = this; if (toolbarButtons) { for (const [name, tool] of toolbarButtons) { await this._editToolbar.addButton(name, tool); } } + this._editToolbar.addButton("comment", this.addCommentButton()); this._editToolbar.addButton("delete"); return this._editToolbar; diff --git a/src/display/editor/toolbar.js b/src/display/editor/toolbar.js index 2cfd4fa34..875a22aff 100644 --- a/src/display/editor/toolbar.js +++ b/src/display/editor/toolbar.js @@ -167,7 +167,7 @@ class EditorToolbar { return; } this.#addListenersToElement(button); - this.#buttons.prepend(button, this.#divider); + this.#buttons.append(button, this.#divider); this.#comment = comment; comment.toolbar = this; }