aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-08-24 17:46:23 -0400
committerbobzel <zzzman@gmail.com>2020-08-24 17:46:23 -0400
commit385fc8bbcb36b5f062f0202a4fb74bcfba00b150 (patch)
tree1e58bd1854c381eb31206fadf56abad9ad57dd98 /src/client/documents/Documents.ts
parent11ad6626648b8f1c06c477705a34731a8255bf31 (diff)
simplified sidebar document structure. changed treeViewHideTitle to treeViewHideTopDoc along with semantics to match. fixed linkBox to work with updates.
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index e4c704ce7..db32dbaec 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -187,7 +187,7 @@ export interface DocumentOptions {
cloneFieldFilter?: List<string>; // fields not to copy when the document is cloned
_stayInCollection?: boolean;// whether the document should remain in its collection when someone tries to drag and drop it elsewhere
treeViewPreventOpen?: boolean; // ignores the treeViewOpen Doc flag which allows a treeViewItem's expand/collapse state to be independent of other views of the same document in the tree view
- treeViewHideTitle?: boolean; // whether to hide the title of a tree view
+ treeViewHideTopLevel?: boolean; // whether to hide the top document of a tree view
treeViewHideHeaderFields?: boolean; // whether to hide the drop down options for tree view items.
treeViewOpen?: boolean; // whether this document is expanded in a tree view
treeViewExpandedView?: string; // which field/thing is displayed when this item is opened in tree view
@@ -682,17 +682,19 @@ export namespace Docs {
export function LinkDocument(source: { doc: Doc, ctx?: Doc }, target: { doc: Doc, ctx?: Doc }, options: DocumentOptions = {}, id?: string) {
const doc = InstanceFromProto(Prototypes.get(DocumentType.LINK), undefined, {
- isLinkButton: true, treeViewHideTitle: true, treeViewOpen: false, backgroundColor: "lightBlue", // lightBlue is default color for linking dot and link documents text comment area
- removeDropProperties: new List(["isBackground", "isLinkButton"]), ...options
+ dontRegisterChildViews: true,
+ isLinkButton: true, treeViewHideTopLevel: true, backgroundColor: "lightBlue", // lightBlue is default color for linking dot and link documents text comment area
+ treeViewExpandedView: "fields", removeDropProperties: new List(["isBackground", "isLinkButton"]), ...options
}, id);
const linkDocProto = Doc.GetProto(doc);
+ linkDocProto.treeViewOpen = true;// setting this in the instance creator would set it on the view document.
linkDocProto.anchor1 = source.doc;
linkDocProto.anchor2 = target.doc;
linkDocProto.anchor1_timecode = source.doc._currentTimecode || source.doc.displayTimecode;
linkDocProto.anchor2_timecode = target.doc._currentTimecode || target.doc.displayTimecode;
if (linkDocProto.linkBoxExcludedKeys === undefined) {
- Cast(linkDocProto.proto, Doc, null).linkBoxExcludedKeys = new List(["treeViewExpandedView", "treeViewHideTitle", "removeDropProperties", "linkBoxExcludedKeys", "treeViewOpen", "aliasNumber", "isPrototype", "lastOpened", "creationDate", "author"]);
+ Cast(linkDocProto.proto, Doc, null).linkBoxExcludedKeys = new List(["treeViewExpandedView", "aliases", "treeViewHideTopDoc", "removeDropProperties", "linkBoxExcludedKeys", "treeViewOpen", "aliasNumber", "isPrototype", "lastOpened", "creationDate", "author"]);
Cast(linkDocProto.proto, Doc, null).layoutKey = undefined;
}