mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 10:15:37 +02:00
[Editor] Add the possibility to move an empty freetext editor with the keyboard (bug 1845088)
This commit is contained in:
parent
8f83a1359e
commit
93b09f6320
3 changed files with 175 additions and 36 deletions
|
@ -561,9 +561,9 @@ class AnnotationEditorUIManager {
|
|||
|
||||
#container = null;
|
||||
|
||||
static #TRANSLATE_SMALL = 1; // page units.
|
||||
static TRANSLATE_SMALL = 1; // page units.
|
||||
|
||||
static #TRANSLATE_BIG = 10; // page units.
|
||||
static TRANSLATE_BIG = 10; // page units.
|
||||
|
||||
static get _keyboardManager() {
|
||||
const arrowChecker = self => {
|
||||
|
@ -576,8 +576,8 @@ class AnnotationEditorUIManager {
|
|||
self.hasSomethingToControl()
|
||||
);
|
||||
};
|
||||
const small = this.#TRANSLATE_SMALL;
|
||||
const big = this.#TRANSLATE_BIG;
|
||||
const small = this.TRANSLATE_SMALL;
|
||||
const big = this.TRANSLATE_BIG;
|
||||
return shadow(
|
||||
this,
|
||||
"_keyboardManager",
|
||||
|
@ -1379,8 +1379,10 @@ class AnnotationEditorUIManager {
|
|||
});
|
||||
}
|
||||
|
||||
translateSelectedEditors(x, y) {
|
||||
this.commitOrRemove();
|
||||
translateSelectedEditors(x, y, noCommit = false) {
|
||||
if (!noCommit) {
|
||||
this.commitOrRemove();
|
||||
}
|
||||
if (!this.hasSelection) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue