Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A couple of (small) tweaks of the AnnotationStorage (PR 12173 follow-up) #12192

Commits on Aug 10, 2020

  1. A couple of (small) tweaks of the AnnotationStorage (PR 12173 follo…

    …w-up)
    
     - Initialize the `AnnotationStorage`-instance, on `PDFDocumentProxy`, lazily.
     - Change the `AnnotationStorage` to use a `Map` internally, rather than a regular Object (simplifies the following points).
     - Let `AnnotationStorage.getAll` return `null` when there's no data stored, to avoid unnecessary parsing on the worker-thread. This ought to "just work", since the worker-thread code *should* already handle the `!annotationStorage` case everywhere.
     - Add a new `AnnotationStorage.size` getter, to be able to easily tell if there's any data stored.
    Snuffleupagus committed Aug 10, 2020
    Configuration menu
    Copy the full SHA
    4d351ea View commit details
    Browse the repository at this point in the history