aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/Main.tsx
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2019-02-27 17:30:16 -0500
committerSam Wilkins <samwilkins333@gmail.com>2019-02-27 17:30:16 -0500
commitbf26137803c09807b6e7e3d9d9ad086a7ead32ac (patch)
tree18cfa1c325edb7aeb1abd60dad16d153c02a4910 /src/client/views/Main.tsx
parent45d9a5bc32aa5d5aa7695c4e6576f3c42f24c5c9 (diff)
parent43626b1c559bfe593bc86babf7a35115d72edd30 (diff)
Merge branch 'authentication' of https://github.com/browngraphicslab/Dash-Web into authentication
Diffstat (limited to 'src/client/views/Main.tsx')
-rw-r--r--src/client/views/Main.tsx14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx
index b59a2a4f7..db7138965 100644
--- a/src/client/views/Main.tsx
+++ b/src/client/views/Main.tsx
@@ -91,14 +91,12 @@ function init(mainDocId: string) {
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.FreeformDocument([], { x: 0, y: 400, title: "mini collection" });
- Utils.Emit(Server.Socket, MessageStore.AddDocument, new DocumentTransfer(mainfreeform.ToJson()));
+ 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));
- mainContainer.SetText(KeyStore.Data, JSON.stringify({ content: [{ type: 'row', content: docs }] }));
- mainContainer.Set(KeyStore.ActiveFrame, mainfreeform);
- }, 0);
+ var docs = [mainfreeform].map(doc => CollectionDockingView.makeDocumentConfig(doc));
+ mainContainer.SetText(KeyStore.Data, JSON.stringify({ content: [{ type: 'row', content: docs }] }));
+ mainContainer.Set(KeyStore.ActiveFrame, mainfreeform);
}
let addImageNode = action(() => {
@@ -191,7 +189,7 @@ function init(mainDocId: string) {
left: '4px',
width: '150px'
}} onClick={() => WorkspacesMenu.Instance.toggle()}>Workspaces</button>
- <WorkspacesMenu load={init} new={getNewWorkspace} active={mainDocId}/>
+ <WorkspacesMenu load={init} new={getNewWorkspace} active={mainDocId} />
</div>),
document.getElementById('root'));
})