1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Merge pull request #13867 from Snuffleupagus/RenderingIntentFlag

[api-minor] Re-factor the *internal* renderingIntent, and change the default `intent` value in the `PDFPageProxy.getAnnotations` method
This commit is contained in:
Tim van der Meij 2021-08-07 19:25:51 +02:00 committed by GitHub
commit 952f6366bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 96 additions and 43 deletions

View file

@ -1443,6 +1443,12 @@ describe("api", function () {
expect(data.length).toEqual(4);
});
const anyPromise = page
.getAnnotations({ intent: "any" })
.then(function (data) {
expect(data.length).toEqual(4);
});
const displayPromise = page
.getAnnotations({ intent: "display" })
.then(function (data) {
@ -1455,7 +1461,12 @@ describe("api", function () {
expect(data.length).toEqual(4);
});
await Promise.all([defaultPromise, displayPromise, printPromise]);
await Promise.all([
defaultPromise,
anyPromise,
displayPromise,
printPromise,
]);
});
it("gets annotations containing relative URLs (bug 766086)", async function () {