MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / readDragPayload

Function readDragPayload

packages/app-core/src/lib/dnd.ts:66–77  ·  view source on GitHub ↗
(e: React.DragEvent)

Source from the content-addressed store, hash-verified

64}
65
66export function readDragPayload(e: React.DragEvent): DragPayload | null {
67 const raw =
68 e.dataTransfer.getData(ZEN_DND_MIME) ||
69 e.dataTransfer.getData(ZEN_DND_ASSET_MIME) ||
70 e.dataTransfer.getData(ZEN_DND_TEXT_MIME)
71 if (!raw) return null
72 try {
73 return JSON.parse(raw) as DragPayload
74 } catch {
75 return null
76 }
77}
78
79export function hasZenItem(e: React.DragEvent): boolean {
80 return (

Callers 8

EditorPaneFunction · 0.90
TasksRowFunction · 0.90
SidebarSectionHeadingFunction · 0.90
RootFolderDropTargetFunction · 0.90
FolderTreeRootFunction · 0.90
SubTreeFunction · 0.90
Sidebar.tsxFile · 0.90
dnd.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected