Merge pull request #19685 from calixteman/issue19424
[Editor] Take into account the parent rotation when switch to edit mode (issue #19424)
This commit is contained in:
commit
cd4a30341f
@ -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.
Loading…
x
Reference in New Issue
Block a user