From 956628a22c2d8ae21eb76c70f8f0a5a4edc9ae75 Mon Sep 17 00:00:00 2001 From: bobzel Date: Thu, 10 Feb 2022 17:12:19 -0500 Subject: switched scripts to use a cache to avoid recompiling. simplified some things with documentView and zooming to avoid invalidations. --- src/client/documents/Documents.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/client/documents') diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 0cb4f4c5e..12b57351d 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -235,7 +235,7 @@ export class DocumentOptions { docColorBtn?: string; userColorBtn?: string; canClick?: string; - script?: string; + script?: ScriptField; numBtnType?: string; numBtnMax?: number; numBtnMin?: number; @@ -594,7 +594,7 @@ export namespace Docs { const options: DocumentOptions = { system: true, _layoutKey: "layout", title, type, baseProto: true, x: 0, y: 0, _width: 300, ...(template.options || {}), layout: layout.view?.LayoutString(layout.dataField), data: template.data, layout_keyValue: KeyValueBox.LayoutString("") - } + }; Object.entries(options).map(pair => { if (typeof pair[1] === "string" && pair[1].startsWith("@")) { (options as any)[pair[0]] = ComputedField.MakeFunction(pair[1].substring(1)); -- cgit v1.2.3-70-g09d2