mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
[Editor] Fix the CSS properties of the canvas when it's used in a stampEditor (bug 1895909)
And move the page canvas properties under canvasWrapper in order to avoid future regressions.
This commit is contained in:
parent
df23679bc6
commit
093bdfd971
4 changed files with 99 additions and 31 deletions
|
@ -291,16 +291,18 @@ function getAnnotationStorage(page) {
|
|||
);
|
||||
}
|
||||
|
||||
function waitForEntryInStorage(page, key, value) {
|
||||
function waitForEntryInStorage(page, key, value, checker = (x, y) => x === y) {
|
||||
return page.waitForFunction(
|
||||
(k, v) => {
|
||||
(k, v, c) => {
|
||||
const { map } =
|
||||
window.PDFViewerApplication.pdfDocument.annotationStorage.serializable;
|
||||
return map && JSON.stringify(map.get(k)) === v;
|
||||
// eslint-disable-next-line no-eval
|
||||
return map && eval(`(${c})`)(JSON.stringify(map.get(k)), v);
|
||||
},
|
||||
{},
|
||||
key,
|
||||
JSON.stringify(value)
|
||||
JSON.stringify(value),
|
||||
checker.toString()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue