aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/Main.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-02-22 03:01:30 -0500
committerTyler Schicke <tyler_schicke@brown.edu>2019-02-22 03:01:30 -0500
commitfed460a9dffd85b32e30aeb112f2c7c47371bce6 (patch)
tree16f8c1d9b4a5e3e4e1b22e6b6520b793801c8b28 /src/client/views/Main.tsx
parent3f9e4363e6601eac175ff71192d414fd6051d921 (diff)
Added CollectionView
Switched sub-collections to not inherit from CollectionViewBase
Diffstat (limited to 'src/client/views/Main.tsx')
-rw-r--r--src/client/views/Main.tsx8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx
index c7a6a44e8..fe1a999ec 100644
--- a/src/client/views/Main.tsx
+++ b/src/client/views/Main.tsx
@@ -61,16 +61,14 @@ Documents.initProtos(() => {
let mainfreeform: Document;
if (res) {
mainContainer = ServerUtils.FromJson(res) as Document;
- mainfreeform = mainContainer.Get(KeyStore.ActiveFrame) as Document;
- if (!mainfreeform)
- Server.GetField(mainContainer._proxies.get(KeyStore.ActiveFrame.Id)!, (field) => mainfreeform = field as Document);
+ mainContainer.GetAsync(KeyStore.ActiveFrame, field => mainfreeform = field as Document);
}
else {
mainContainer = Documents.DockDocument(JSON.stringify({ content: [{ type: 'row', content: [] }] }), { title: "main container" }, mainDocId);
Utils.Emit(Server.Socket, MessageStore.AddDocument, new DocumentTransfer(mainContainer.ToJson()))
setTimeout(() => {
- mainfreeform = Documents.CollectionDocument([], { x: 0, y: 400, title: "mini collection" });
+ mainfreeform = Documents.FreeformDocument([], { x: 0, y: 400, title: "mini collection" });
Utils.Emit(Server.Socket, MessageStore.AddDocument, new DocumentTransfer(mainfreeform.ToJson()));
var docs = [mainfreeform].map(doc => CollectionDockingView.makeDocumentConfig(doc));
@@ -90,7 +88,7 @@ Documents.initProtos(() => {
}));
})
let addColNode = action(() => {
- mainfreeform.GetList<Document>(KeyStore.Data, []).push(Documents.CollectionDocument([], {
+ mainfreeform.GetList<Document>(KeyStore.Data, []).push(Documents.FreeformDocument([], {
x: 0, y: 300, width: 200, height: 200, title: "added note"
}));
})