1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

Convert a number of import * as pdfjsLib from 'pdfjs-web/pdfjs'; cases to only specify the necessary imports

Rather than always importing everything from the `web/pdfjs.js`, similar to all other imports we can just choose what we actually need.
This commit is contained in:
Jonas Jenwald 2017-03-28 10:15:02 +02:00
parent 3b35c15d42
commit b2c3f8f081
14 changed files with 89 additions and 86 deletions

View file

@ -13,7 +13,7 @@
* limitations under the License.
*/
import * as pdfjsLib from 'pdfjs-web/pdfjs';
import { AnnotationLayer } from 'pdfjs-web/pdfjs';
import { mozL10n } from 'pdfjs-web/ui_utils';
import { SimpleLinkService } from 'pdfjs-web/pdf_link_service';
@ -72,7 +72,7 @@ var AnnotationLayerBuilder = (function AnnotationLayerBuilderClosure() {
if (self.div) {
// If an annotationLayer already exists, refresh its children's
// transformation matrices.
pdfjsLib.AnnotationLayer.update(parameters);
AnnotationLayer.update(parameters);
} else {
// Create an annotation layer div and render the annotations
// if there is at least one annotation.
@ -85,7 +85,7 @@ var AnnotationLayerBuilder = (function AnnotationLayerBuilderClosure() {
self.pageDiv.appendChild(self.div);
parameters.div = self.div;
pdfjsLib.AnnotationLayer.render(parameters);
AnnotationLayer.render(parameters);
if (typeof mozL10n !== 'undefined') {
mozL10n.translate(self.div);
}