aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionViewBase.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-04-08 12:49:39 -0400
committerbob <bcz@cs.brown.edu>2019-04-08 12:49:39 -0400
commit3a9f6df918ad45e55b0c6a540cb566aff4940288 (patch)
tree4e30d80bf02f79af177ccec95b1263fd86dad1d5 /src/client/views/collections/CollectionViewBase.tsx
parentbf05eac7677997075bc58d2b70c3e101e2e87560 (diff)
added copyOnDrag stuff.
Diffstat (limited to 'src/client/views/collections/CollectionViewBase.tsx')
-rw-r--r--src/client/views/collections/CollectionViewBase.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionViewBase.tsx b/src/client/views/collections/CollectionViewBase.tsx
index 458bae7ab..7cf49e215 100644
--- a/src/client/views/collections/CollectionViewBase.tsx
+++ b/src/client/views/collections/CollectionViewBase.tsx
@@ -82,13 +82,13 @@ export class CollectionViewBase extends React.Component<SubCollectionViewProps>
@action
protected drop(e: Event, de: DragManager.DropEvent): boolean {
if (de.data instanceof DragManager.DocumentDragData) {
- if (de.data.aliasOnDrop) {
+ if (de.data.aliasOnDrop || de.data.copyOnDrop) {
[KeyStore.Width, KeyStore.Height, KeyStore.CurPage].map(key =>
de.data.draggedDocuments.map((draggedDocument: Document, i: number) =>
draggedDocument.GetTAsync(key, NumberField, (f: Opt<NumberField>) => f ? de.data.droppedDocuments[i].SetNumber(key, f.Data) : null)));
}
let added = de.data.droppedDocuments.reduce((added, d) => this.props.addDocument(d, false), true);
- if (added && de.data.removeDocument && !de.data.aliasOnDrop) {
+ if (added && de.data.removeDocument && !de.data.aliasOnDrop && !de.data.copyOnDrop) {
de.data.removeDocument(this.props.CollectionView);
}
e.stopPropagation();