aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-09-25 22:26:54 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-09-25 22:26:54 -0400
commitf4b628c2a6810c1af51508685f12287a300d6e6f (patch)
tree1436d78f37bc90c5774ee38f93670c4b418fe832 /src/client/documents/Documents.ts
parent4fcd809dde18603d978013af59392e7016662070 (diff)
all pdf annotations work?
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index ea7a3a8b6..392dca373 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -95,12 +95,13 @@ export namespace Docs {
export namespace Prototypes {
- type LayoutSource = { LayoutString: () => string };
+ type LayoutSource = { LayoutString: (ext?: string) => string };
type CollectionLayoutSource = { LayoutString: (fieldStr: string, fieldExt?: string) => string };
type CollectionViewType = [CollectionLayoutSource, string, string?];
type PrototypeTemplate = {
layout: {
view: LayoutSource,
+ ext?: string, // optional extension field for layout source
collectionView?: CollectionViewType
},
options?: Partial<DocumentOptions>
@@ -144,7 +145,7 @@ export namespace Docs {
options: { height: 32 }
}],
[DocumentType.PDF, {
- layout: { view: PDFBox },
+ layout: { view: PDFBox, ext: anno },
options: { nativeWidth: 1200, curPage: 1 }
}],
[DocumentType.ICON, {
@@ -254,7 +255,7 @@ export namespace Docs {
// synthesize the default options, the type and title from computed values and
// whatever options pertain to this specific prototype
let options = { title: title, type: type, baseProto: true, ...defaultOptions, ...(template.options || {}) };
- let primary = layout.view.LayoutString();
+ let primary = layout.view.LayoutString(layout.ext);
let collectionView = layout.collectionView;
if (collectionView) {
options.layout = collectionView[0].LayoutString(collectionView[1], collectionView[2]);