diff options
author | kimdahey <claire_kim1@brown.edu> | 2019-08-23 16:29:20 -0400 |
---|---|---|
committer | kimdahey <claire_kim1@brown.edu> | 2019-08-23 16:29:20 -0400 |
commit | deb6b40757fe0492559139cc1c9245026a645d34 (patch) | |
tree | 5c4b515eaebb4322e8166e07cfc4cbd4ba48dfb2 /src/client/util/DragManager.ts | |
parent | d722bf96c11ecff06904029d2e3f49544f6f03f9 (diff) | |
parent | bdb132d92eafc43f04bf6f002b8082d233ccafc3 (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into doc_deco_claire
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]; }); |