mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-08-02 12:27: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
|
||||
mappings.sort((a, b) => a.charCode - b.charCode);
|
||||
const finalMappings = [],
|
||||
seenCharCodes = new Set();
|
||||
for (const map of mappings) {
|
||||
@ -1875,7 +1876,7 @@ class Font {
|
||||
return {
|
||||
platformId: potentialTable.platformId,
|
||||
encodingId: potentialTable.encodingId,
|
||||
mappings: finalMappings.sort((a, b) => a.charCode - b.charCode),
|
||||
mappings: finalMappings,
|
||||
hasShortCmap,
|
||||
};
|
||||
}
|
||||
|
||||
@ -134,6 +134,9 @@ class IdManager {
|
||||
|
||||
constructor() {
|
||||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING")) {
|
||||
Object.defineProperty(this, "reset", {
|
||||
value: () => (this.#id = 0),
|
||||
});
|
||||
Object.defineProperty(this, "getNextId", {
|
||||
value: () => this.#id,
|
||||
});
|
||||
@ -1064,6 +1067,13 @@ class AnnotationEditorUIManager {
|
||||
commentManager?.setSidebarUiManager(this);
|
||||
|
||||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING")) {
|
||||
Object.defineProperty(this, "reset", {
|
||||
value: () => {
|
||||
this.selectAll();
|
||||
this.delete();
|
||||
this.#idManager.reset();
|
||||
},
|
||||
});
|
||||
Object.defineProperty(this, "getNextEditorId", {
|
||||
value: () => this.#idManager.getNextId(),
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user