diff options
author | bobzel <zzzman@gmail.com> | 2025-04-23 14:39:29 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-04-23 14:39:29 -0400 |
commit | e969c6c4abe08d7f46d51d5511a04a5500a76d3e (patch) | |
tree | 1acc13ef853263f76fe5f39a64bd61c54961a61f /src | |
parent | 7671e543dc677c82071d6eaccc33bd164450620d (diff) |
fixed how pdf worker is copied and accessed.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/scrapbook/ScrapbookBox.tsx | 3 | ||||
-rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/nodes/scrapbook/ScrapbookBox.tsx b/src/client/views/nodes/scrapbook/ScrapbookBox.tsx index 6ee9f39ab..b241b27d7 100644 --- a/src/client/views/nodes/scrapbook/ScrapbookBox.tsx +++ b/src/client/views/nodes/scrapbook/ScrapbookBox.tsx @@ -52,7 +52,8 @@ export class ScrapbookBox extends ViewBoxAnnotatableComponent<FieldViewProps>() const placeholder = new Doc(); placeholder.proto = image; placeholder.original = image; - placeholder.height = 200; + placeholder._width = 250; + placeholder._height = 200; placeholder.x = 0; placeholder.y = -100; //placeholder.overrideFields = new List<string>(['x', 'y']); // shouldn't need to do this for layout fields since the placeholder already overrides its protos diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 21d987587..041fc0de7 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -31,7 +31,7 @@ import { Annotation } from './Annotation'; import { GPTPopup } from './GPTPopup/GPTPopup'; import './PDFViewer.scss'; import { DocumentViewProps } from '../nodes/DocumentContentsView'; -if (window?.Worker) GlobalWorkerOptions.workerSrc = 'files/pdf.worker.min.mjs'; +if (window?.Worker) GlobalWorkerOptions.workerSrc = 'files/node_modules/pdfjs-dist/build/pdf.worker.min.mjs'; // npm start/etc use copyfiles to copy the worker from the pdfjs-dist package to the public folder export * from 'pdfjs-dist/build/pdf.mjs'; interface IViewerProps extends FieldViewProps { |