aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-09-03 16:47:52 -0400
committerbob <bcz@cs.brown.edu>2019-09-03 16:47:52 -0400
commit25e8cc61f67bed3063dc81997d31f29e451b5610 (patch)
tree3381aa45ceddd72068385d260473403f30fb693f /src/client/documents/Documents.ts
parent7e87aa4b7e0125482c87ab61f4a0de14e774558d (diff)
parenta4d36f835b5c43351d1761034b61513b000445ba (diff)
merged with master
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index e40e095d6..4b7f1eeb6 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -45,6 +45,7 @@ import { PresBox } from "../views/nodes/PresBox";
import { ComputedField } from "../../new_fields/ScriptField";
import { ProxyField } from "../../new_fields/Proxy";
import { DocumentType } from "./DocumentTypes";
+import { LinkFollowBox } from "../views/linking/LinkFollowBox";
//import { PresBox } from "../views/nodes/PresBox";
//import { PresField } from "../../new_fields/PresField";
var requestImageSize = require('../util/request-image-size');
@@ -53,6 +54,7 @@ var path = require('path');
export interface DocumentOptions {
x?: number;
y?: number;
+ z?: number;
type?: string;
width?: number;
height?: number;
@@ -77,6 +79,7 @@ export interface DocumentOptions {
borderRounding?: string;
schemaColumns?: List<SchemaHeaderField>;
dockingConfig?: string;
+ autoHeight?: boolean;
dbDoc?: Doc;
// [key: string]: Opt<Field>;
}
@@ -169,6 +172,9 @@ export namespace Docs {
[DocumentType.DRAGBOX, {
layout: { view: DragBox },
options: { width: 40, height: 40 },
+ }],
+ [DocumentType.LINKFOLLOW, {
+ layout: { view: LinkFollowBox }
}]
]);
@@ -442,6 +448,10 @@ export namespace Docs {
return InstanceFromProto(Prototypes.get(DocumentType.DRAGBOX), undefined, { ...(options || {}) });
}
+ export function LinkFollowBoxDocument(options?: DocumentOptions) {
+ return InstanceFromProto(Prototypes.get(DocumentType.LINKFOLLOW), undefined, { ...(options || {}) });
+ }
+
export function DockDocument(documents: Array<Doc>, config: string, options: DocumentOptions, id?: string) {
return InstanceFromProto(Prototypes.get(DocumentType.COL), new List(documents), { ...options, viewType: CollectionViewType.Docking, dockingConfig: config }, id);
}