diff options
| author | bob <bcz@cs.brown.edu> | 2019-03-18 11:48:24 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-03-18 11:48:24 -0400 |
| commit | 8418b842b16da68150243e1750aa8b40eb8a8792 (patch) | |
| tree | ec92fd749aa93d90f889aa26e3233506973e7c9d /src/client/views/collections/MarqueeView.tsx | |
| parent | d5304e13839830c60c0c5698849535b0605e3c32 (diff) | |
fixed removing from schemas. fixed dragging link button to move quickly. cleaned up drag/drop code a little
Diffstat (limited to 'src/client/views/collections/MarqueeView.tsx')
| -rw-r--r-- | src/client/views/collections/MarqueeView.tsx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/client/views/collections/MarqueeView.tsx b/src/client/views/collections/MarqueeView.tsx index f5c83a934..8c2f3443c 100644 --- a/src/client/views/collections/MarqueeView.tsx +++ b/src/client/views/collections/MarqueeView.tsx @@ -17,7 +17,7 @@ interface MarqueeViewProps { getMarqueeTransform: () => Transform; getTransform: () => Transform; container: CollectionFreeFormView; - addDocument: (doc: Document) => void; + addDocument: (doc: Document, allowDuplicates: false) => void; activeDocuments: () => Document[]; selectDocuments: (docs: Document[]) => void; removeDocument: (doc: Document) => boolean; @@ -111,7 +111,18 @@ export class MarqueeView extends React.Component<MarqueeViewProps> let liftedInk = this.marqueeInkSelect(true); this.props.container.props.Document.SetData(KeyStore.Ink, this.marqueeInkSelect(false), InkField); //setTimeout(() => { - this.props.addDocument(Documents.FreeformDocument(selected, { x: bounds.left, y: bounds.top, panx: 0, pany: 0, width: bounds.width, backgroundColor: "Transparent", height: bounds.height, ink: liftedInk, title: "a nested collection" })); + let newCollection = Documents.FreeformDocument(selected, { + x: bounds.left, + y: bounds.top, + panx: 0, + pany: 0, + width: bounds.width, + height: bounds.height, + backgroundColor: "Transparent", + ink: liftedInk, + title: "a nested collection" + }); + this.props.addDocument(newCollection, false); // }, 100); this.cleanupInteractions(); } |
