Merge pull request #20180 from calixteman/mv_comment_button

[Editor] Move the comment button just before the delete one
This commit is contained in:
calixteman 2025-08-24 12:00:29 +02:00 committed by GitHub
commit 78f63dd6db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;
}