mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-08-03 04:47:21 +02:00
Compare commits
No commits in common. "813d1949ba1431f1e1a4a77d42bc05de60754688" and "d71fe9025de50aaa80ea4a6d825c583352f93416" have entirely different histories.
813d1949ba
...
d71fe9025d
@ -1860,6 +1860,7 @@ class Font {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// removing duplicate entries
|
// removing duplicate entries
|
||||||
|
mappings.sort((a, b) => a.charCode - b.charCode);
|
||||||
const finalMappings = [],
|
const finalMappings = [],
|
||||||
seenCharCodes = new Set();
|
seenCharCodes = new Set();
|
||||||
for (const map of mappings) {
|
for (const map of mappings) {
|
||||||
@ -1875,7 +1876,7 @@ class Font {
|
|||||||
return {
|
return {
|
||||||
platformId: potentialTable.platformId,
|
platformId: potentialTable.platformId,
|
||||||
encodingId: potentialTable.encodingId,
|
encodingId: potentialTable.encodingId,
|
||||||
mappings: finalMappings.sort((a, b) => a.charCode - b.charCode),
|
mappings: finalMappings,
|
||||||
hasShortCmap,
|
hasShortCmap,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -134,6 +134,9 @@ 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,
|
||||||
});
|
});
|
||||||
@ -1064,6 +1067,13 @@ 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