From 713e9fea2af9d1cd78db647887ae198c65e0bdfa Mon Sep 17 00:00:00 2001 From: WJG Date: Mon, 11 Nov 2024 23:56:09 +0800 Subject: [PATCH] docs: correct payload property from paths to position for over type DragDropEvent --- packages/api/src/webview.ts | 2 +- packages/api/src/window.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/api/src/webview.ts b/packages/api/src/webview.ts index b5a63646deb9..28bed5b3fed8 100644 --- a/packages/api/src/webview.ts +++ b/packages/api/src/webview.ts @@ -567,7 +567,7 @@ class Webview { * import { getCurrentWebview } from "@tauri-apps/api/webview"; * const unlisten = await getCurrentWebview().onDragDropEvent((event) => { * if (event.payload.type === 'over') { - * console.log('User hovering', event.payload.paths); + * console.log('User hovering', event.payload.position); * } else if (event.payload.type === 'drop') { * console.log('User dropped', event.payload.paths); * } else { diff --git a/packages/api/src/window.ts b/packages/api/src/window.ts index ae648f1b076d..d9a02879c219 100644 --- a/packages/api/src/window.ts +++ b/packages/api/src/window.ts @@ -1771,7 +1771,7 @@ class Window { * import { getCurrentWindow } from "@tauri-apps/api/webview"; * const unlisten = await getCurrentWindow().onDragDropEvent((event) => { * if (event.payload.type === 'over') { - * console.log('User hovering', event.payload.paths); + * console.log('User hovering', event.payload.position); * } else if (event.payload.type === 'drop') { * console.log('User dropped', event.payload.paths); * } else {