aboutsummaryrefslogtreecommitdiff
path: root/src/client/util
diff options
context:
space:
mode:
authorSam Wilkins <abdullah_ahmed@brown.edu>2019-07-18 19:24:58 -0400
committerSam Wilkins <abdullah_ahmed@brown.edu>2019-07-18 19:24:58 -0400
commit8a1be635352177ba05845851289d1a67b4060708 (patch)
tree787eb46da1d63036db5c2d6d4cdae37fbfc9eccd /src/client/util
parent28420a749a0e06ee105a2d8f1cc3c273469b83d7 (diff)
schema cols can be moved by dragging
Diffstat (limited to 'src/client/util')
-rw-r--r--src/client/util/DragManager.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts
index 323908302..f9f6b05c0 100644
--- a/src/client/util/DragManager.ts
+++ b/src/client/util/DragManager.ts
@@ -288,6 +288,15 @@ export namespace DragManager {
[id: string]: any;
}
+ // for column dragging in schema view
+ export class ColumnDragData {
+ constructor(colKey: string) {
+ this.colKey = colKey;
+ }
+ colKey: string;
+ [id: string]: any;
+ }
+
export function StartLinkDrag(ele: HTMLElement, dragData: LinkDragData, downX: number, downY: number, options?: DragOptions) {
StartDrag([ele], dragData, downX, downY, options);
}
@@ -296,6 +305,10 @@ export namespace DragManager {
StartDrag([ele], dragData, downX, downY, options);
}
+ export function StartColumnDrag(ele: HTMLElement, dragData: ColumnDragData, downX: number, downY: number, options?:DragOptions) {
+ StartDrag([ele], dragData, downX, downY, options);
+ }
+
export let AbortDrag: () => void = emptyFunction;
function StartDrag(eles: HTMLElement[], dragData: { [id: string]: any }, downX: number, downY: number, options?: DragOptions, finishDrag?: (dropData: { [id: string]: any }) => void) {