mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
[Editor] Take into account the parent rotation when switch to edit mode (issue #19424)
This commit is contained in:
parent
1a39e2dac1
commit
276c8f3518
4 changed files with 32 additions and 0 deletions
|
@ -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
|
||||
!red_stamp.pdf
|
||||
!issue19633.pdf
|
||||
!issue19424.pdf
|
||||
|
|
BIN
test/pdfs/issue19424.pdf
Executable file
BIN
test/pdfs/issue19424.pdf
Executable file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue