mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-08-03 04:47:21 +02:00
Compare commits
4 Commits
00e3a4d87a
...
cd4a30341f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd4a30341f | ||
|
|
276c8f3518 | ||
|
|
1a39e2dac1 | ||
|
|
79058c92e3 |
@ -984,6 +984,7 @@ class HighlightEditor extends AnnotationEditor {
|
|||||||
clipPathId,
|
clipPathId,
|
||||||
});
|
});
|
||||||
editor.#addToDrawLayer();
|
editor.#addToDrawLayer();
|
||||||
|
editor.rotate(editor.parentRotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
return editor;
|
return editor;
|
||||||
|
|||||||
@ -2674,4 +2674,34 @@ describe("Highlight Editor", () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("Highlight must be rotated when existing in the pdf", () => {
|
||||||
|
let pages;
|
||||||
|
|
||||||
|
beforeAll(async () => {
|
||||||
|
pages = await loadAndWait("issue19424.pdf", ".annotationEditorLayer");
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async () => {
|
||||||
|
await closePages(pages);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("must check that there is no scroll because of focus", async () => {
|
||||||
|
await Promise.all(
|
||||||
|
pages.map(async ([browserName, page]) => {
|
||||||
|
await page.evaluate(() => {
|
||||||
|
window.PDFViewerApplication.rotatePages(90);
|
||||||
|
});
|
||||||
|
await page.waitForSelector(
|
||||||
|
".annotationEditorLayer[data-main-rotation='90']"
|
||||||
|
);
|
||||||
|
await switchToHighlight(page);
|
||||||
|
|
||||||
|
await page.waitForSelector(
|
||||||
|
".canvasWrapper svg[data-main-rotation='90']"
|
||||||
|
);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -713,3 +713,4 @@
|
|||||||
!colors.pdf
|
!colors.pdf
|
||||||
!red_stamp.pdf
|
!red_stamp.pdf
|
||||||
!issue19633.pdf
|
!issue19633.pdf
|
||||||
|
!issue19424.pdf
|
||||||
|
|||||||
BIN
test/pdfs/issue19424.pdf
Executable file
BIN
test/pdfs/issue19424.pdf
Executable file
Binary file not shown.
@ -187,10 +187,10 @@ class SignatureManager {
|
|||||||
},
|
},
|
||||||
{ passive: true }
|
{ passive: true }
|
||||||
);
|
);
|
||||||
description.addEventListener(
|
this.#description.addEventListener(
|
||||||
"input",
|
"input",
|
||||||
() => {
|
() => {
|
||||||
this.#clearDescription.disabled = description.value === "";
|
this.#clearDescription.disabled = this.#description.value === "";
|
||||||
},
|
},
|
||||||
{ passive: true }
|
{ passive: true }
|
||||||
);
|
);
|
||||||
|
|||||||
@ -716,9 +716,9 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||||||
<div id="addSignatureControls">
|
<div id="addSignatureControls">
|
||||||
<div id="horizontalContainer">
|
<div id="horizontalContainer">
|
||||||
<div id="addSignatureDescriptionContainer">
|
<div id="addSignatureDescriptionContainer">
|
||||||
<label for="addSignatureDescription" data-l10n-id="pdfjs-editor-add-signature-description-label"></span></label>
|
<label for="addSignatureDescInput" data-l10n-id="pdfjs-editor-add-signature-description-label"></label>
|
||||||
<span id="addSignatureDescription" class="inputWithClearButton">
|
<span id="addSignatureDescription" class="inputWithClearButton">
|
||||||
<input type="text" data-l10n-id="pdfjs-editor-add-signature-description-input" tabindex="0"></input>
|
<input id="addSignatureDescInput" type="text" data-l10n-id="pdfjs-editor-add-signature-description-input" tabindex="0"></input>
|
||||||
<button class="clearInputButton" type="button" tabindex="0" aria-hidden="true"></button>
|
<button class="clearInputButton" type="button" tabindex="0" aria-hidden="true"></button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -755,9 +755,9 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||||||
</div>
|
</div>
|
||||||
<div id="editSignatureDescriptionAndView">
|
<div id="editSignatureDescriptionAndView">
|
||||||
<div id="editSignatureDescriptionContainer">
|
<div id="editSignatureDescriptionContainer">
|
||||||
<label for="editSignatureDescription" data-l10n-id="pdfjs-editor-add-signature-description-label"></span></label>
|
<label for="editSignatureDescInput" data-l10n-id="pdfjs-editor-add-signature-description-label"></label>
|
||||||
<span id="editSignatureDescription" class="inputWithClearButton">
|
<span id="editSignatureDescription" class="inputWithClearButton">
|
||||||
<input type="text" data-l10n-id="pdfjs-editor-add-signature-description-input" tabindex="0"></input>
|
<input id="editSignatureDescInput" type="text" data-l10n-id="pdfjs-editor-add-signature-description-input" tabindex="0"></input>
|
||||||
<button class="clearInputButton" type="button" tabindex="0" aria-hidden="true"></button>
|
<button class="clearInputButton" type="button" tabindex="0" aria-hidden="true"></button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user