|
@@ -58,26 +58,32 @@ div.full-size.pdf(ng-controller="PdfController")
|
|
|
i.split-screen
|
|
i.split-screen
|
|
|
|
|
|
|
|
.pdf-viewer(ng-show="pdf.url && pdf.view == 'pdf' && !pdf.failure && !pdf.timeout && !pdf.error")
|
|
.pdf-viewer(ng-show="pdf.url && pdf.view == 'pdf' && !pdf.failure && !pdf.timeout && !pdf.error")
|
|
|
- div(
|
|
|
|
|
- pdfjs
|
|
|
|
|
- ng-if="settings.pdfViewer == 'pdfjs' && !(user.featureSwitches && user.featureSwitches.pdfng)"
|
|
|
|
|
- pdf-src="pdf.url"
|
|
|
|
|
- key="{{ project_id }}"
|
|
|
|
|
- resize-on="layout:main:resize,layout:pdf:resize"
|
|
|
|
|
- highlights="pdf.highlights"
|
|
|
|
|
- position="pdf.position"
|
|
|
|
|
- dbl-click-callback="syncToCode"
|
|
|
|
|
- )
|
|
|
|
|
- div(
|
|
|
|
|
- pdfng
|
|
|
|
|
- ng-if="settings.pdfViewer == 'pdfjs' && user.featureSwitches && user.featureSwitches.pdfng"
|
|
|
|
|
- pdf-src="pdf.url"
|
|
|
|
|
- key="{{ project_id }}"
|
|
|
|
|
- resize-on="layout:main:resize,layout:pdf:resize"
|
|
|
|
|
- highlights="pdf.highlights"
|
|
|
|
|
- position="pdf.position"
|
|
|
|
|
- dbl-click-callback="syncToCode"
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ - // user.featureSwitches = {} // override
|
|
|
|
|
+ - var usePdfNG = user.featureSwitches && user.featureSwitches.pdfng;
|
|
|
|
|
+ - console.log('USER FEATURE SWITCHES', user.featureSwitches, usePdfNG);
|
|
|
|
|
+ if !usePdfNG
|
|
|
|
|
+ div(
|
|
|
|
|
+ pdfjs
|
|
|
|
|
+ ng-if="settings.pdfViewer == 'pdfjs'"
|
|
|
|
|
+ pdf-src="pdf.url"
|
|
|
|
|
+ key="{{ project_id }}"
|
|
|
|
|
+ resize-on="layout:main:resize,layout:pdf:resize"
|
|
|
|
|
+ highlights="pdf.highlights"
|
|
|
|
|
+ position="pdf.position"
|
|
|
|
|
+ dbl-click-callback="syncToCode"
|
|
|
|
|
+ )
|
|
|
|
|
+ else
|
|
|
|
|
+ div(
|
|
|
|
|
+ pdfng
|
|
|
|
|
+ ng-if="settings.pdfViewer == 'pdfjs'"
|
|
|
|
|
+ pdf-src="pdf.url"
|
|
|
|
|
+ key="{{ project_id }}"
|
|
|
|
|
+ resize-on="layout:main:resize,layout:pdf:resize"
|
|
|
|
|
+ highlights="pdf.highlights"
|
|
|
|
|
+ position="pdf.position"
|
|
|
|
|
+ dbl-click-callback="syncToCode"
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
iframe(
|
|
iframe(
|
|
|
ng-src="{{ pdf.url }}"
|
|
ng-src="{{ pdf.url }}"
|
|
|
ng-if="settings.pdfViewer == 'native'"
|
|
ng-if="settings.pdfViewer == 'native'"
|