Skip to content

Commit 5b21772

Browse files
committed
feat(diplomas): serve worker script locally
1 parent 316f921 commit 5b21772

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

src/app/app.component.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,19 @@ export class AppComponent implements OnInit {
1313
ngOnInit(): void {
1414
this.modal.container = this.container;
1515

16+
/*
17+
Initialize PDF-JS config before first usage, according to
18+
https://github.com/VadimDez/ng2-pdf-viewer/blob/HEAD/README.md#set-custom-path-to-the-worker
19+
*/
20+
/* eslint-disable @typescript-eslint/no-explicit-any */
21+
(window as any).pdfWorkerSrc = '/assets/scripts/pdf.worker.min.js';
22+
1623
/*
1724
Initialize MathJax config before first usage, according to
1825
https://docs.mathjax.org/en/latest/web/configuration.html#using-a-local-file-for-configuration
1926
*/
20-
// @ts-ignore
21-
window.MathJax = {
27+
/* eslint-disable @typescript-eslint/no-explicit-any */
28+
(window as any).MathJax = {
2229
svg: {
2330
fontCache: 'global'
2431
}

src/assets/scripts/pdf.worker.min.js

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)