aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-01-21 10:35:21 -0500
committerbobzel <zzzman@gmail.com>2021-01-21 10:35:21 -0500
commit62d918756afb0e95bae693fe20c28f65d5438c11 (patch)
tree74ebdc582de7b11defd6dd2e623bbd72c57e8987 /src/client/documents/Documents.ts
parentb3e2520f81a9956320b1aeba14ea880aa2887b15 (diff)
from last
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index d2ef86da7..df08345f9 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -764,11 +764,16 @@ export namespace Docs {
}
export function PdfDocument(url: string, options: DocumentOptions = {}) {
- return InstanceFromProto(Prototypes.get(DocumentType.PDF), new PdfField(new URL(url)), options);
+ const pdfProto = Prototypes.get(DocumentType.PDF);
+ pdfProto._fitWidth = true; // backward compatibility -- can be removed after db is reset
+ return InstanceFromProto(pdfProto, new PdfField(new URL(url)), options);
}
export function WebDocument(url: string, options: DocumentOptions = {}) {
- return InstanceFromProto(Prototypes.get(DocumentType.WEB), url ? new WebField(new URL(url)) : undefined, { _chromeStatus: url ? "disabled" : "enabled", isAnnotating: false, _lockedTransform: true, ...options });
+ const webProto = Prototypes.get(DocumentType.WEB);
+ webProto.scrollHeight = 100000; // backward compatibility -- can be removed after db is reset
+ webProto._fitWidth = true; // backward compatibility -- can be removed after db is reset
+ return InstanceFromProto(webProto, url ? new WebField(new URL(url)) : undefined, { _chromeStatus: url ? "disabled" : "enabled", isAnnotating: false, _lockedTransform: true, ...options });
}
export function HtmlDocument(html: string, options: DocumentOptions = {}) {