diff options
-rw-r--r-- | src/client/views/DocumentDecorations.tsx | 5 | ||||
-rw-r--r-- | src/client/views/Main.scss | 4 | ||||
-rw-r--r-- | src/client/views/Main.tsx | 2 | ||||
-rw-r--r-- | src/client/views/nodes/CollectionFreeFormDocumentView.tsx | 2 |
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} |