aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/Main.tsx
diff options
context:
space:
mode:
authorHannah Chow <hannah_chow@brown.edu>2019-03-05 17:38:50 -0500
committerHannah Chow <hannah_chow@brown.edu>2019-03-05 17:38:50 -0500
commite64667c09f72e69f8121039809b48167a1d55465 (patch)
tree95b55ddc6dcdce566d127ee35d00dbb8bd56c567 /src/client/views/Main.tsx
parent9724ff4d5de3c776b34f5d733fd37845b863f29b (diff)
parentbb1d3120f11a47e9d493202c1003dae52bf6667f (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into hannah_linking
Diffstat (limited to 'src/client/views/Main.tsx')
-rw-r--r--src/client/views/Main.tsx11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx
index 24c2ea7f7..d845fa7a3 100644
--- a/src/client/views/Main.tsx
+++ b/src/client/views/Main.tsx
@@ -4,7 +4,8 @@ import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Document } from '../../fields/Document';
import { KeyStore } from '../../fields/KeyStore';
-import { DocumentTransfer, MessageStore } from '../../server/Message';
+import "./Main.scss";
+import { MessageStore } from '../../server/Message';
import { Utils } from '../../Utils';
import { Documents } from '../documents/Documents';
import { Server } from '../Server';
@@ -31,7 +32,6 @@ document.addEventListener("pointerdown", action(function (e: PointerEvent) {
const mainDocId = "mainDoc";
let mainContainer: Document;
let mainfreeform: Document;
-console.log("HELLO WORLD")
Documents.initProtos(mainDocId, (res?: Document) => {
if (res instanceof Document) {
mainContainer = res;
@@ -54,12 +54,14 @@ Documents.initProtos(mainDocId, (res?: Document) => {
let weburl = "https://cs.brown.edu/courses/cs166/";
let clearDatabase = action(() => Utils.Emit(Server.Socket, MessageStore.DeleteAll, {}))
let addTextNode = action(() => Documents.TextDocument({ width: 200, height: 200, title: "a text note" }))
- let addColNode = action(() => Documents.FreeformDocument([], { width: 200, height: 200, title: "a feeform collection" }));
+ let addColNode = action(() => Documents.FreeformDocument([], { width: 200, height: 200, title: "a freeform collection" }));
let addSchemaNode = action(() => Documents.SchemaDocument([Documents.TextDocument()], { width: 200, height: 200, title: "a schema collection" }));
let addImageNode = action(() => Documents.ImageDocument(imgurl, { width: 200, height: 200, title: "an image of a cat" }));
let addWebNode = action(() => Documents.WebDocument(weburl, { width: 200, height: 200, title: "a sample web page" }));
- let addClick = (creator: () => Document) => action(() => mainfreeform.GetList<Document>(KeyStore.Data, []).push(creator()));
+ let addClick = (creator: () => Document) => action(() =>
+ mainfreeform.GetList<Document>(KeyStore.Data, []).push(creator())
+ );
let imgRef = React.createRef<HTMLDivElement>();
let webRef = React.createRef<HTMLDivElement>();
@@ -76,6 +78,7 @@ Documents.initProtos(mainDocId, (res?: Document) => {
PanelHeight={() => 0}
isTopMost={true}
SelectOnLoad={false}
+ focus={() => { }}
ContainingCollectionView={undefined} />
<DocumentDecorations />
<ContextMenu />