aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 84e6258ac..3780df5b9 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -105,7 +105,6 @@ export class DocumentOptions {
userColor?: STRt = new StrInfo("color associated with a Dash user (seen in header fields of shared documents)");
color?: STRt = new StrInfo("foreground color data doc");
backgroundColor?: STRt = new StrInfo("background color for data doc");
- _backgroundColor?: STRt = new StrInfo("background color for each template layout doc (overrides backgroundColor)");
_autoHeight?: BOOLt = new BoolInfo("whether document automatically resizes vertically to display contents");
_headerHeight?: NUMt = new NumInfo("height of document header used for displaying title");
_headerFontSize?: NUMt = new NumInfo("font size of header of custom notes");
@@ -328,6 +327,7 @@ export class DocumentOptions {
text?: string;
textTransform?: string; // is linear view expanded
letterSpacing?: string; // is linear view expanded
+ iconTemplate?: string; // name of icon template style
selectedIndex?: number; // which item in a linear view has been selected using the "thumb doc" ui
clipboard?: Doc;
searchQuery?: string; // for quersyBox
@@ -1288,9 +1288,7 @@ export namespace DocUtils {
const batch = UndoManager.StartBatch("makeCustomViewClicked");
runInAction(() => {
doc.layoutKey = "layout_" + templateSignature;
- if (doc[doc.layoutKey] === undefined) {
- createCustomView(doc, creator, templateSignature, docLayoutTemplate);
- }
+ createCustomView(doc, creator, templateSignature, docLayoutTemplate);
});
batch.end();
return doc;
@@ -1318,7 +1316,9 @@ export namespace DocUtils {
const options = { title: "data", backgroundColor: StrCast(doc.backgroundColor), _autoHeight: true, _width, x: -_width / 2, y: - _height / 2, _showSidebar: false };
if (docLayoutTemplate) {
- Doc.ApplyTemplateTo(docLayoutTemplate, doc, customName, undefined);
+ if (docLayoutTemplate !== doc[customName]) {
+ Doc.ApplyTemplateTo(docLayoutTemplate, doc, customName, undefined);
+ }
} else {
let fieldTemplate: Opt<Doc>;
if (doc.data instanceof RichTextField || typeof (doc.data) === "string") {