mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
[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:
parent
4bf7ff2027
commit
1ea6293923
19 changed files with 897 additions and 56 deletions
|
@ -13,13 +13,11 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/** @typedef {import("../src/display/draw_layer.js").DrawLayer} DrawLayer */
|
||||
|
||||
import { DrawLayer } from "pdfjs-lib";
|
||||
|
||||
/**
|
||||
* @typedef {Object} DrawLayerBuilderOptions
|
||||
* @property {DrawLayer} [drawLayer]
|
||||
* @property {number} pageIndex
|
||||
*/
|
||||
|
||||
class DrawLayerBuilder {
|
||||
|
@ -53,6 +51,14 @@ class DrawLayerBuilder {
|
|||
this.#drawLayer.destroy();
|
||||
this.#drawLayer = null;
|
||||
}
|
||||
|
||||
setParent(parent) {
|
||||
this.#drawLayer?.setParent(parent);
|
||||
}
|
||||
|
||||
getDrawLayer() {
|
||||
return this.#drawLayer;
|
||||
}
|
||||
}
|
||||
|
||||
export { DrawLayerBuilder };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue