mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
[Editor] Change the cursors for highlighting (bug 1876588)
This commit is contained in:
parent
4ec43488ff
commit
f3bdbedf9b
5 changed files with 35 additions and 10 deletions
|
@ -334,7 +334,7 @@ class AnnotationEditorLayer {
|
|||
"pointerdown",
|
||||
this.#boundTextLayerPointerDown
|
||||
);
|
||||
this.#textLayer.div.classList.add("drawing");
|
||||
this.#textLayer.div.classList.add("highlighting");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -345,7 +345,7 @@ class AnnotationEditorLayer {
|
|||
"pointerdown",
|
||||
this.#boundTextLayerPointerDown
|
||||
);
|
||||
this.#textLayer.div.classList.remove("drawing");
|
||||
this.#textLayer.div.classList.remove("highlighting");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -359,11 +359,19 @@ class AnnotationEditorLayer {
|
|||
// Do nothing on right click.
|
||||
return;
|
||||
}
|
||||
this.#textLayer.div.classList.add("free");
|
||||
HighlightEditor.startHighlighting(
|
||||
this,
|
||||
this.#uiManager.direction === "ltr",
|
||||
event
|
||||
);
|
||||
this.#textLayer.div.addEventListener(
|
||||
"pointerup",
|
||||
() => {
|
||||
this.#textLayer.div.classList.remove("free");
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue