aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionTreeView.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-11-04 13:08:47 -0500
committerbob <bcz@cs.brown.edu>2019-11-04 13:08:47 -0500
commit70a6f10779729cff4a1b46d56dd5ff84f41ed14e (patch)
tree4b826130b252ac86b67ec6a3af6bd49f5b58e785 /src/client/views/collections/CollectionTreeView.tsx
parentcb7078190a06ea19cb443626b9023b93c1930e3a (diff)
cleaned up some exceptions, runtime warnings, fixed borderRounding, and adding to Library->Documents
Diffstat (limited to 'src/client/views/collections/CollectionTreeView.tsx')
-rw-r--r--src/client/views/collections/CollectionTreeView.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx
index 47c355fc8..89cc69ccf 100644
--- a/src/client/views/collections/CollectionTreeView.tsx
+++ b/src/client/views/collections/CollectionTreeView.tsx
@@ -221,10 +221,10 @@ class TreeView extends React.Component<TreeViewProps> {
}
let movedDocs = (de.data.options === this.props.treeViewId ? de.data.draggedDocuments : de.data.droppedDocuments);
return (de.data.dropAction || de.data.userDropAction) ?
- de.data.droppedDocuments.reduce((added, d) => this.props.addDocument(d, undefined, before) || added, false)
+ de.data.droppedDocuments.reduce((added, d) => addDoc(d) || added, false)
: de.data.moveDocument ?
movedDocs.reduce((added, d) => de.data.moveDocument(d, undefined, addDoc) || added, false)
- : de.data.droppedDocuments.reduce((added, d) => this.props.addDocument(d, undefined, before), false);
+ : de.data.droppedDocuments.reduce((added, d) => addDoc(d), false);
}
return false;
}
@@ -474,7 +474,7 @@ class TreeView extends React.Component<TreeViewProps> {
let aspect = NumCast(childLayout.nativeWidth, 0) / NumCast(childLayout.nativeHeight, 0);
return aspect ? Math.min(childLayout[WidthSym](), rowWidth()) / aspect : childLayout[HeightSym]();
};
- return <TreeView
+ return !(child instanceof Doc) ? (null) : <TreeView
document={pair.layout}
dataDoc={pair.data}
containingCollection={containingCollection}