From baf4eb6b520102a8e785c8bac5f239955bdff396 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Fri, 25 Aug 2017 15:47:56 +0100 Subject: [PATCH] Export PDFJS Cmaps path to window --- services/web/app/views/project/editor.pug | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/web/app/views/project/editor.pug b/services/web/app/views/project/editor.pug index 190a46b77e..fb92510917 100644 --- a/services/web/app/views/project/editor.pug +++ b/services/web/app/views/project/editor.pug @@ -102,6 +102,7 @@ block requirejs //- don't use cdn for workers - var aceWorkerPath = buildJsPath(lib('ace'), {cdn:false,fingerprint:false}) - var pdfWorkerPath = buildJsPath('/libs/' + lib('pdfjs') + '/pdf.worker', {cdn:false,fingerprint:false}) + - var pdfCMapsPath = buildJsPath('/libs/' + lib('pdfjs') + '/bcmaps/', {cdn:false,fingerprint:false}) //- We need to do .replace(/\//g, '\\/') do that '' -> '<\/script>' //- and doesn't prematurely end the script tag. @@ -154,6 +155,7 @@ block requirejs }; window.aceFingerprint = "#{fingerprint(jsPath + lib('ace') + '/ace.js')}" window.aceWorkerPath = "#{aceWorkerPath}"; + window.pdfCMapsPath = "#{pdfCMapsPath}" script( data-main=buildJsPath("ide.js", {fingerprint:false}),