aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-04-26 14:18:33 -0400
committerbob <bcz@cs.brown.edu>2019-04-26 14:18:33 -0400
commit76582288310c5372dedf3feb45d548acfa3a7e9b (patch)
treebf4e1dfe75e43c565c73e53b943bb615a93321f4 /src
parent96b1e27da348e47a4d5c83b182a5f55e96e3218e (diff)
details
Diffstat (limited to 'src')
-rw-r--r--src/client/views/DocumentDecorations.tsx5
-rw-r--r--src/client/views/Main.scss4
-rw-r--r--src/client/views/Main.tsx2
-rw-r--r--src/client/views/nodes/CollectionFreeFormDocumentView.tsx2
4 files changed, 10 insertions, 3 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index 06d2f580c..0ea3bfc90 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -241,12 +241,15 @@ export class DocumentDecorations extends React.Component<{}, { value: string }>
@action
public getIconDoc = async (docView: DocumentView): Promise<Document | undefined> => {
let doc = docView.props.Document;
- return await doc.GetTAsync(KeyStore.MinimizedDoc, Document).then(async mindoc =>
+ let iconDoc = await doc.GetTAsync(KeyStore.MinimizedDoc, Document).then(async mindoc =>
mindoc ? mindoc :
await doc.GetTAsync(KeyStore.BackgroundLayout, TextField).then(async field =>
(field instanceof TextField) ? this.createIcon(docView, field.Data) :
await doc.GetTAsync(KeyStore.Layout, TextField).then(field =>
(field instanceof TextField) ? this.createIcon(docView, field.Data) : undefined)));
+ if (SelectionManager.SelectedDocuments()[0].props.addDocument !== undefined)
+ SelectionManager.SelectedDocuments()[0].props.addDocument!(iconDoc!);
+ return iconDoc;
}
@action
onMinimizeUp = (e: PointerEvent): void => {
diff --git a/src/client/views/Main.scss b/src/client/views/Main.scss
index 2f899ff28..0029bdeaf 100644
--- a/src/client/views/Main.scss
+++ b/src/client/views/Main.scss
@@ -12,6 +12,10 @@ body {
left:0;
}
+div {
+ user-select: none;
+}
+
#dash-title {
position: absolute;
right: 46.5%;
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx
index c6b3f06d8..129079271 100644
--- a/src/client/views/Main.tsx
+++ b/src/client/views/Main.tsx
@@ -214,7 +214,7 @@ export class Main extends React.Component {
let audiourl = "http://techslides.com/demos/samples/sample.mp3";
let videourl = "http://techslides.com/demos/sample-videos/small.mp4";
- let addTextNode = action(() => Documents.TextDocument({ width: 200, height: 200, title: "a text note" }));
+ let addTextNode = action(() => Documents.TextDocument({ borderRounding: -1, width: 200, height: 50, title: "a text note" }));
let addColNode = action(() => Documents.FreeformDocument([], { width: 200, height: 200, title: "a freeform collection" }));
let addSchemaNode = action(() => Documents.SchemaDocument([], { width: 200, height: 200, title: "a schema collection" }));
let addTreeNode = action(() => Documents.TreeDocument(this._northstarSchemas, { width: 250, height: 400, title: "northstar schemas", copyDraggedItems: true }));
diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
index 4537ce3eb..a3a82036d 100644
--- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
+++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
@@ -169,7 +169,7 @@ export class CollectionFreeFormDocumentView extends React.Component<CollectionFr
const screenWidth = 1800;
let fadeUp = .75 * screenWidth;
let fadeDown = (maximizedDoc ? .0075 : .075) * screenWidth;
- zoomFade = w < fadeDown /* || w > fadeUp */ ? Math.max(0, Math.min(1, 2 - (w < fadeDown ? fadeDown / w : w / fadeUp))) : 1;
+ zoomFade = w < fadeDown /* || w > fadeUp */ ? Math.max(0.1, Math.min(1, 2 - (w < fadeDown ? fadeDown / w : w / fadeUp))) : 1;
return (
<div className="collectionFreeFormDocumentView-container" ref={this._mainCont}