Browse Source

disable PDF.js autofetch only when used in new pdf viewer

Brian Gough 12 years ago
parent
commit
be91bc2754

+ 0 - 1
services/web/public/coffee/ide/pdfng/directives/pdfJs.coffee

@@ -13,7 +13,6 @@ define [
 ) ->
 	if PDFJS?
 		PDFJS.workerSrc = window.pdfJsWorkerPath
-		PDFJS.disableAutoFetch = true
 
 	style = $("<style/>")
 	style.text(textLayerCss + "\n" + annotationsLayerCss + "\n" + highlightsLayerCss)

+ 1 - 0
services/web/public/coffee/ide/pdfng/directives/pdfRenderer.coffee

@@ -11,6 +11,7 @@ define [
 			@JOB_QUEUE_INTERVAL: 100
 
 			constructor: (@url, @options) ->
+				PDFJS.disableAutoFetch = true
 				@scale = @options.scale || 1
 				@document = $q.when(PDFJS.getDocument @url)
 				@navigateFn = @options.navigateFn