[Editor] Add a new editor to highlight some text in a pdf (bug 1866119)

This patch is first big step for the new highlight feature.
Few patches will follow in order to conform to the specs UX/UI gave us.
This commit is contained in:
Calixte Denizet 2023-11-22 19:02:42 +01:00
parent 4bf7ff2027
commit 1ea6293923
19 changed files with 897 additions and 56 deletions

View file

@ -35,11 +35,17 @@ import { NullL10n } from "web-l10n_utils";
* @property {IL10n} [l10n]
* @property {TextAccessibilityManager} [accessibilityManager]
* @property {AnnotationLayer} [annotationLayer]
* @property {TextLayer} [textLayer]
* @property {DrawLayer} [drawLayer]
*/
class AnnotationEditorLayerBuilder {
#annotationLayer = null;
#drawLayer = null;
#textLayer = null;
#uiManager;
/**
@ -55,6 +61,8 @@ class AnnotationEditorLayerBuilder {
this._cancelled = false;
this.#uiManager = options.uiManager;
this.#annotationLayer = options.annotationLayer || null;
this.#textLayer = options.textLayer || null;
this.#drawLayer = options.drawLayer || null;
}
/**
@ -93,6 +101,8 @@ class AnnotationEditorLayerBuilder {
l10n: this.l10n,
viewport: clonedViewport,
annotationLayer: this.#annotationLayer,
textLayer: this.#textLayer,
drawLayer: this.#drawLayer,
});
const parameters = {