diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-04-26 01:56:41 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-04-26 01:56:41 -0400 |
commit | e6549d43be83b50d364c4a3ab1e8e7381ce2fd59 (patch) | |
tree | a804d1897f0805637b34e900f0613b2609c9c701 /src/client/util/DragManager.ts | |
parent | 94ecd9c794ca27760e7885d2dc3bc33b928968e7 (diff) |
fixed title layout for text. fixed documentBox for nested collections. fixed tree view for text boxes. changed labelbox formatting.
Diffstat (limited to 'src/client/util/DragManager.ts')
-rw-r--r-- | src/client/util/DragManager.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts index 577366cd4..35694a6bd 100644 --- a/src/client/util/DragManager.ts +++ b/src/client/util/DragManager.ts @@ -180,7 +180,7 @@ export namespace DragManager { export function MakeDropTarget( element: HTMLElement, dropFunc: (e: Event, de: DropEvent) => void, - doc?:Doc + doc?: Doc ): DragDropDisposer { if ("canDrop" in element.dataset) { throw new Error( @@ -189,12 +189,12 @@ export namespace DragManager { } element.dataset.canDrop = "true"; const handler = (e: Event) => dropFunc(e, (e as CustomEvent<DropEvent>).detail); - const preDropHandler = (e:Event) => { + const preDropHandler = (e: Event) => { const de = (e as CustomEvent<DropEvent>).detail; if (de.complete.docDragData && doc?.targetDropAction) { - de.complete.docDragData!.dropAction = StrCast(doc.targetDropAction) as dropActionType; + de.complete.docDragData.dropAction = StrCast(doc.targetDropAction) as dropActionType; } - } + }; element.addEventListener("dashOnDrop", handler); doc && element.addEventListener("dashPreDrop", preDropHandler); return () => { |