From 8f5fc8d4b2a4283645096440ed8ffe91d9304591 Mon Sep 17 00:00:00 2001 From: Peter Brant Date: Tue, 14 Feb 2017 18:18:23 +0100 Subject: [PATCH] Fix export of NativeStreamImageDecoder --- src/display/api.js | 2 +- web/viewer.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/display/api.js b/src/display/api.js index bc8261137bcc2..edc66fc8777fd 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -1670,7 +1670,7 @@ var InternalRenderTask = (function InternalRenderTaskClosure() { return InternalRenderTask; })(); -var NativeImageStreamDecoder = (function NativeImageStreamDecoderClosure() { +var NativeImageStreamDecoder = PDFJS.NativeImageStreamDecoder = (function NativeImageStreamDecoderClosure() { var result = { init: function(module) { info('Initializing native image stream decoder message handler'); diff --git a/web/viewer.js b/web/viewer.js index 6a9d7213b238f..2f85eccef7e31 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -23,7 +23,6 @@ OverlayManager, PDFFindController, PDFFindBar, getVisibleElements, watchScroll, PDFViewer, PDFRenderingQueue, PresentationModeState, RenderingStates, DEFAULT_SCALE, UNKNOWN_SCALE, - NativeImageStreamDecoder, IGNORE_CURRENT_POSITION_ON_ZOOM: true */ 'use strict'; @@ -1477,7 +1476,7 @@ function webViewerInitialized() { var initImageStreamDecoder = function() { console.info('Native image stream decoder module loaded successfully.'); - NativeImageStreamDecoder.init(moduleEl); + PDFJS.NativeImageStreamDecoder.init(moduleEl); }; var disableImageStreamDecoder = function(which) { return function() { @@ -1485,7 +1484,7 @@ function webViewerInitialized() { 'Image stream decoder has stopped (' + which + '). Last error was ' + moduleEl.lastError + '.' ); - NativeImageStreamDecoder.disable(); + PDFJS.NativeImageStreamDecoder.disable(); } };