diff options
author | bob <bcz@cs.brown.edu> | 2020-03-04 19:06:56 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2020-03-04 19:06:56 -0500 |
commit | 15a4525d83844963357e38e496a3f382e3e720de (patch) | |
tree | 630ae3f678524a6b54791315e9fe72d10c8ae6dc /src/client/util/DragManager.ts | |
parent | 3d22c2551b9c4acf7cd24496556603740f6d0736 (diff) |
border rounding for template key values. added creationTime for dropped documents.
Diffstat (limited to 'src/client/util/DragManager.ts')
-rw-r--r-- | src/client/util/DragManager.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts index 65a210bb3..af920c7da 100644 --- a/src/client/util/DragManager.ts +++ b/src/client/util/DragManager.ts @@ -15,6 +15,7 @@ import { listSpec } from "../../new_fields/Schema"; import { Scripting } from "./Scripting"; import { convertDropDataToButtons } from "./DropConverter"; import { AudioBox } from "../views/nodes/AudioBox"; +import { DateField } from "../../new_fields/DateField"; export type dropActionType = "alias" | "copy" | undefined; export function SetupDrag( @@ -192,6 +193,7 @@ export namespace DragManager { // drag a document and drop it (or make an alias/copy on drop) export function StartDocumentDrag(eles: HTMLElement[], dragData: DocumentDragData, downX: number, downY: number, options?: DragOptions) { const addAudioTag = (dropDoc: any) => { + !dropDoc.creationDate && (dropDoc.creationDate = new DateField); dropDoc instanceof Doc && AudioBox.ActiveRecordings.map(d => DocUtils.MakeLink({ doc: dropDoc }, { doc: d }, "audio link", "audio timeline")); return dropDoc; } |