[Editor] Add some resizers all around an editor (bug 1843302)

- it'll improve the way to resize images: diagonally (in keeping ratio between dimensions)
  or horizontally/vertically.
- the resizer was almost invisible in HCM.
- make a resize undoable/redoable.
This commit is contained in:
Calixte Denizet 2023-07-24 09:49:49 +02:00
parent 71f113bf85
commit 2688bf2ebd
6 changed files with 452 additions and 41 deletions

View file

@ -280,6 +280,12 @@ class CommandManager {
this.#commands.push(save);
}
stopUndoAccumulation() {
if (this.#position !== -1) {
this.#commands[this.#position].type = NaN;
}
}
/**
* Undo the last command.
*/
@ -1168,6 +1174,10 @@ class AnnotationEditorUIManager {
return this.#selectedEditors.size !== 0;
}
stopUndoAccumulation() {
this.#commandManager.stopUndoAccumulation();
}
/**
* Undo the last command.
*/