diff options
| author | Stanley Yip <stanley_yip@brown.edu> | 2020-04-19 01:50:59 -0700 |
|---|---|---|
| committer | Stanley Yip <stanley_yip@brown.edu> | 2020-04-19 01:50:59 -0700 |
| commit | 587a97e9f5fc49952d7520829d719614477e2717 (patch) | |
| tree | 17653b697d7474a5d48b0f4ac177b439d6c6bb6b /src/client/util | |
| parent | a8438bd233d497a4471c4e0776c0f32b8c4ff8fd (diff) | |
generate snap lines
Diffstat (limited to 'src/client/util')
| -rw-r--r-- | src/client/util/DragManager.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts index 3e9a5b63a..21306c339 100644 --- a/src/client/util/DragManager.ts +++ b/src/client/util/DragManager.ts @@ -18,6 +18,7 @@ import { AudioBox } from "../views/nodes/AudioBox"; import { DateField } from "../../new_fields/DateField"; import { DocumentView } from "../views/nodes/DocumentView"; import { UndoManager } from "./UndoManager"; +import { PointData } from "../../new_fields/InkField"; export type dropActionType = "place" | "alias" | "copy" | undefined; export function SetupDrag( @@ -73,6 +74,7 @@ export function SetupDrag( export namespace DragManager { let dragDiv: HTMLDivElement; + let snapLines: [PointData, PointData][]; export function Root() { const root = document.getElementById("root"); @@ -281,6 +283,10 @@ export namespace DragManager { StartDrag([ele], {}, downX, downY); } + export function SetSnapLines() { + snapLines = []; + } + function StartDrag(eles: HTMLElement[], dragData: { [id: string]: any }, downX: number, downY: number, options?: DragOptions, finishDrag?: (dropData: DragCompleteEvent) => void) { eles = eles.filter(e => e); if (!dragDiv) { |
