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.ts17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 951632d71..5f2a592ae 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -259,6 +259,7 @@ export class DocumentOptions {
layout_hideResizeHandles?: BOOLt = new BoolInfo('whether to hide the resize handles when selected');
layout_hideLinkButton?: BOOLt = new BoolInfo('whether the blue link counter button should be hidden');
layout_hideDecorationTitle?: BOOLt = new BoolInfo('whether to suppress the document decortations title when selected');
+ layout_hideDecorations?: BOOLt = new BoolInfo('whether to suppress all document decortations when selected');
_layout_hideContextMenu?: BOOLt = new BoolInfo('whether the context menu can be shown');
layout_diagramEditor?: STRt = new StrInfo('specify the JSX string for a diagram editor view');
layout_hideContextMenu?: BOOLt = new BoolInfo('whether the context menu can be shown');
@@ -304,6 +305,7 @@ export class DocumentOptions {
_text_fontSize?: string;
_text_fontFamily?: string;
_text_fontWeight?: string;
+ text_align?: STRt = new StrInfo('horizontal text alignment default');
fontSize?: string;
_pivotField?: string; // field key used to determine headings for sections in stacking, masonry, pivot views
@@ -734,6 +736,9 @@ export namespace Docs {
updateCachedAcls(dataDoc);
updateCachedAcls(viewDoc);
+ if (data instanceof List) {
+ data.map(item => item instanceof Doc && Doc.SetContainer(item, viewDoc));
+ }
return viewDoc;
}
@@ -923,15 +928,13 @@ export namespace Docs {
}
export function CalendarDocument(options: DocumentOptions, documents: Array<Doc>) {
- const inst = InstanceFromProto(Prototypes.get(DocumentType.COL), new List(documents), {
+ return InstanceFromProto(Prototypes.get(DocumentType.COL), new List(documents), {
_layout_nativeDimEditable: true,
_layout_reflowHorizontal: true,
_layout_reflowVertical: true,
...options,
_type_collection: CollectionViewType.Calendar,
});
- documents.forEach(d => Doc.SetContainer(d, inst));
- return inst;
}
// shouldn't ever need to create a KVP document-- instead set the LayoutTemplateString to be a KeyValueBox for the DocumentView (see addDocTab in TabDocView)
@@ -940,9 +943,7 @@ export namespace Docs {
// }
export function FreeformDocument(documents: Array<Doc>, options: DocumentOptions, id?: string) {
- const inst = InstanceFromProto(Prototypes.get(DocumentType.COL), new List(documents), { ...options, _type_collection: CollectionViewType.Freeform }, id);
- documents.forEach(d => Doc.SetContainer(d, inst));
- return inst;
+ return InstanceFromProto(Prototypes.get(DocumentType.COL), new List(documents), { ...options, _type_collection: CollectionViewType.Freeform }, id);
}
export function ConfigDocument(options: DocumentOptions, id?: string) {
@@ -1047,9 +1048,7 @@ export namespace Docs {
}
export function DockDocument(documents: Array<Doc>, config: string, options: DocumentOptions, id?: string) {
- const ret = InstanceFromProto(Prototypes.get(DocumentType.COL), new List(documents), { treeView_FreezeChildren: 'remove|add', ...options, type_collection: CollectionViewType.Docking, dockingConfig: config }, id);
- documents.map(c => Doc.SetContainer(c, ret));
- return ret;
+ return InstanceFromProto(Prototypes.get(DocumentType.COL), new List(documents), { treeView_FreezeChildren: 'remove|add', ...options, type_collection: CollectionViewType.Docking, dockingConfig: config }, id);
}
export function DelegateDocument(proto: Doc, options: DocumentOptions = {}) {