From 5f88fedee8c61100cc9e9ca2aa7b4e411b8b16f3 Mon Sep 17 00:00:00 2001 From: DefectingCat Date: Mon, 10 Oct 2022 09:17:24 +0800 Subject: [PATCH] add comment --- lib/utils/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/utils/index.ts b/lib/utils/index.ts index 086950e..83593e8 100644 --- a/lib/utils/index.ts +++ b/lib/utils/index.ts @@ -86,6 +86,11 @@ export const generateToc = (source: string) => { return toc; }; +/** + * Get mouse or touch position on screen. + * @param e Mouse or Touch event. + * @returns + */ export const getMousePosition = (e: MouseEvent | globalThis.TouchEvent) => { return e instanceof MouseEvent ? {