mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
[api-minor] Refactor the annotation code to be asynchronous
This commit is the first step towards implementing parsing for the appearance streams of annotations. Co-authored-by: Jonas Jenwald <jonas.jenwald@gmail.com> Co-authored-by: Tim van der Meij <timvandermeij@gmail.com>
This commit is contained in:
parent
c8ee63319d
commit
3741becb9b
4 changed files with 482 additions and 432 deletions
|
@ -723,9 +723,9 @@ var WorkerMessageHandler = {
|
|||
}
|
||||
);
|
||||
|
||||
handler.on('GetAnnotations', function wphSetupGetAnnotations(data) {
|
||||
return pdfManager.getPage(data.pageIndex).then(function(page) {
|
||||
return pdfManager.ensure(page, 'getAnnotationsData', [data.intent]);
|
||||
handler.on('GetAnnotations', function({ pageIndex, intent, }) {
|
||||
return pdfManager.getPage(pageIndex).then(function(page) {
|
||||
return page.getAnnotationsData(intent);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue