diff options
| author | bob <bcz@cs.brown.edu> | 2019-06-19 09:36:21 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-06-19 09:36:21 -0400 |
| commit | 0674331f3611d297028526c888c718a75b012e0a (patch) | |
| tree | 47a240a65dee71827bfe9a1aba7e2379bdb346de /src/client/views/collections/CollectionTreeView.tsx | |
| parent | 1472d2b56aa64896f0a93f172322121d19cd1592 (diff) | |
fixed resizing stacking views. changed defaults for new docs in treeView
Diffstat (limited to 'src/client/views/collections/CollectionTreeView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionTreeView.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx index f6c9ba86b..5e690361c 100644 --- a/src/client/views/collections/CollectionTreeView.tsx +++ b/src/client/views/collections/CollectionTreeView.tsx @@ -22,6 +22,8 @@ import React = require("react"); import { Transform } from '../../util/Transform'; import { SelectionManager } from '../../util/SelectionManager'; import { emptyFunction } from '../../../Utils'; +import { List } from '../../../new_fields/List'; +import { Templates } from '../Templates'; export interface TreeViewProps { @@ -144,8 +146,9 @@ class TreeView extends React.Component<TreeViewProps> { GetValue={() => StrCast(this.props.document[key])} OnFillDown={(value: string) => { Doc.GetProto(this.props.document)[key] = value; - let doc = Docs.FreeformDocument([], { title: "untitled" }); + let doc = Docs.FreeformDocument([], { title: "", x: 0, y: 0, width: 100, height: 25 }); TreeView.loadId = doc[Id]; + doc.templates = new List<string>([Templates.Title.Layout]); this.props.addDocument(doc); return true; }} |
