diff options
| author | ab <abdullah_ahmed@brown.edu> | 2019-08-13 17:26:49 -0400 |
|---|---|---|
| committer | ab <abdullah_ahmed@brown.edu> | 2019-08-13 17:26:49 -0400 |
| commit | e03a1b2cc90e0fdb7789f4826e482e9040aa7075 (patch) | |
| tree | 8704de27d354bc20512a6b8058df3e4ba4c1bb64 /src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | |
| parent | 843ac47f04f8c9bd687600f9f07fe4c15744e4ec (diff) | |
80% done, garbage collection is much needed
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index d1e8031fd..50f7e2dc8 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -896,10 +896,13 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) { allDocs.forEach(doc => console.log(doc.title)); // clears internal representation of documents as vectors ClientRecommender.Instance.reset_docs(); - await Promise.all(activedocs.map((doc: Doc) => { - //console.log(StrCast(doc.title)); - const extdoc = doc.data_ext as Doc; - return ClientRecommender.Instance.extractText(doc, extdoc ? extdoc : doc); + await Promise.all(allDocs.map((doc: Doc) => { + console.log(StrCast(doc.title)); + if (doc.type === DocumentType.IMG) { + console.log(doc.title); + const extdoc = doc.data_ext as Doc; + return ClientRecommender.Instance.extractText(doc, extdoc ? extdoc : doc); + } })); console.log(ClientRecommender.Instance.createDistanceMatrix()); }, @@ -1013,7 +1016,7 @@ class CollectionFreeFormViewPannableContents extends React.Component<CollectionF const zoom = this.props.zoomScaling();// needs to be a variable outside of the <Measure> otherwise, reactions won't fire return <div className={freeformclass} style={{ borderRadius: "inherit", transform: `translate(${cenx}px, ${ceny}px) scale(${zoom}, ${zoom}) translate(${panx}px, ${pany}px)` }}> {this.props.children} - <ClientRecommender title="Distance Matrix" /> + {/* <ClientRecommender title="Distance Matrix" /> */} </div>; } }
\ No newline at end of file |
