mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-27 01:17:22 +02:00
Merge pull request #21489 from Snuffleupagus/editor-tools-rm-testing-reset
Remove the `AnnotationEditorUIManager` and `IdManager` test-only `reset` methods (PR 19809 follow-up)
This commit is contained in:
commit
a1acf4fc9f
@ -134,9 +134,6 @@ class IdManager {
|
|||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING")) {
|
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING")) {
|
||||||
Object.defineProperty(this, "reset", {
|
|
||||||
value: () => (this.#id = 0),
|
|
||||||
});
|
|
||||||
Object.defineProperty(this, "getNextId", {
|
Object.defineProperty(this, "getNextId", {
|
||||||
value: () => this.#id,
|
value: () => this.#id,
|
||||||
});
|
});
|
||||||
@ -1067,13 +1064,6 @@ class AnnotationEditorUIManager {
|
|||||||
commentManager?.setSidebarUiManager(this);
|
commentManager?.setSidebarUiManager(this);
|
||||||
|
|
||||||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING")) {
|
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING")) {
|
||||||
Object.defineProperty(this, "reset", {
|
|
||||||
value: () => {
|
|
||||||
this.selectAll();
|
|
||||||
this.delete();
|
|
||||||
this.#idManager.reset();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
Object.defineProperty(this, "getNextEditorId", {
|
Object.defineProperty(this, "getNextEditorId", {
|
||||||
value: () => this.#idManager.getNextId(),
|
value: () => this.#idManager.getNextId(),
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user