mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 10:15:37 +02:00
[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:
parent
71f113bf85
commit
2688bf2ebd
6 changed files with 452 additions and 41 deletions
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue