diff options
author | bob <bcz@cs.brown.edu> | 2019-08-23 14:52:29 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-08-23 14:52:29 -0400 |
commit | bdb132d92eafc43f04bf6f002b8082d233ccafc3 (patch) | |
tree | 12e8398bfdfbf13087e3604994e957ce32f09ddf /src/client/util/DragManager.ts | |
parent | b421b50ccc5fd481b40a42945088bb51156fe499 (diff) |
small fixes to collection buttons.
Diffstat (limited to 'src/client/util/DragManager.ts')
-rw-r--r-- | src/client/util/DragManager.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts index 748fb9d13..4c9c9c17c 100644 --- a/src/client/util/DragManager.ts +++ b/src/client/util/DragManager.ts @@ -252,7 +252,7 @@ export namespace DragManager { }); } - export function StartButtonDrag(eles: HTMLElement[], script: string, title: string, vars: { [name: string]: Field }, params: string[], downX: number, downY: number, options?: DragOptions) { + export function StartButtonDrag(eles: HTMLElement[], script: string, title: string, vars: { [name: string]: Field }, params: string[], initialize?: (button: Doc) => void, downX: number, downY: number, options?: DragOptions) { let dragData = new DragManager.DocumentDragData([], [undefined]); runInAction(() => StartDragFunctions.map(func => func())); StartDrag(eles, dragData, downX, downY, options, options && options.finishDrag ? options.finishDrag : @@ -268,6 +268,7 @@ export namespace DragManager { bd.onClick = scriptField; } params.map(p => Object.keys(vars).indexOf(p) !== -1 && (Doc.GetProto(bd)[p] = new PrefetchProxy(vars[p] as Doc))); + initialize && initialize(bd); bd.buttonParams = new List<string>(params); dropData.droppedDocuments = [bd]; }); |