aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-03-09 19:47:45 -0400
committerGitHub <noreply@github.com>2020-03-09 19:47:45 -0400
commit7fa0783cdc37a70dc8d967188a27d50f269042cc (patch)
treebaa864643547ba264e85a09ad878818ab3cf7111 /src/client/views/nodes/DocumentView.tsx
parentcabb2cf9065d85112f1bd89e31b41dafdbc4ba54 (diff)
parent08aa3b6fc47cb7719c5690c176d05db36e724382 (diff)
Merge pull request #345 from browngraphicslab/audio_refactor
Audio refactor
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index dc529b79b..a1cba4c2e 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -15,7 +15,7 @@ import { AudioField, ImageField, PdfField, VideoField } from '../../../new_field
import { TraceMobx } from '../../../new_fields/util';
import { GestureUtils } from '../../../pen-gestures/GestureUtils';
import { CurrentUserUtils } from "../../../server/authentication/models/current_user_utils";
-import { emptyFunction, returnOne, returnTransparent, returnTrue, Utils } from "../../../Utils";
+import { emptyFunction, returnOne, returnTransparent, returnTrue, Utils, OmitKeys } from "../../../Utils";
import { GooglePhotos } from '../../apis/google_docs/GooglePhotosClientUtils';
import { DocServer } from "../../DocServer";
import { Docs, DocumentOptions, DocUtils } from "../../documents/Documents";
@@ -571,9 +571,9 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
else if (de.complete.docDragData.draggedDocuments[0].type === "text") {
const text = Cast(de.complete.docDragData.draggedDocuments[0].data, RichTextField)?.Text;
if (text && text[0] === "{" && text[text.length - 1] === "}" && text.includes(":")) {
- let loc = text.indexOf(":");
- let key = text.slice(1, loc);
- let value = text.slice(loc + 1, text.length - 1);
+ const loc = text.indexOf(":");
+ const key = text.slice(1, loc);
+ const value = text.slice(loc + 1, text.length - 1);
console.log(key);
console.log(value);
console.log(this.props.Document);
@@ -756,7 +756,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
// a.download = `DocExport-${this.props.Document[Id]}.zip`;
// a.click();
});
- let recommender_subitems: ContextMenuProps[] = [];
+ const recommender_subitems: ContextMenuProps[] = [];
recommender_subitems.push({
description: "Internal recommendations",
@@ -764,7 +764,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
icon: "brain"
});
- let ext_recommender_subitems: ContextMenuProps[] = [];
+ const ext_recommender_subitems: ContextMenuProps[] = [];
ext_recommender_subitems.push({
description: "arXiv",
@@ -872,7 +872,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
}
}));
const doclist = ClientRecommender.Instance.computeSimilarities("cosine");
- let recDocs: { preview: Doc, score: number }[] = [];
+ const recDocs: { preview: Doc, score: number }[] = [];
// tslint:disable-next-line: prefer-for-of
for (let i = 0; i < doclist.length; i++) {
recDocs.push({ preview: doclist[i].actualDoc, score: doclist[i].score });
@@ -956,7 +956,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
childScaling = () => (this.layoutDoc._fitWidth ? this.props.PanelWidth() / this.nativeWidth : this.props.ContentScaling());
@computed get contents() {
TraceMobx();
- return (<DocumentContentsView {...this.props}
+ return (<DocumentContentsView {...OmitKeys(this.props, ['children']).omit}
ContentScaling={this.childScaling}
ChromeHeight={this.chromeHeight}
isSelected={this.isSelected}
@@ -1113,7 +1113,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
</> :
this.innards}
</div>;
- { this._showKPQuery ? <KeyphraseQueryView keyphrases={this._queries}></KeyphraseQueryView> : undefined }
+ { this._showKPQuery ? <KeyphraseQueryView keyphrases={this._queries}></KeyphraseQueryView> : undefined; }
}
}