diff options
author | bobzel <zzzman@gmail.com> | 2021-01-21 10:35:21 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-01-21 10:35:21 -0500 |
commit | 62d918756afb0e95bae693fe20c28f65d5438c11 (patch) | |
tree | 74ebdc582de7b11defd6dd2e623bbd72c57e8987 /src | |
parent | b3e2520f81a9956320b1aeba14ea880aa2887b15 (diff) |
from last
Diffstat (limited to 'src')
-rw-r--r-- | src/client/documents/Documents.ts | 9 |
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 = {}) { |