add comment

This commit is contained in:
DefectingCat
2022-10-10 09:17:24 +08:00
parent 3f6b7f0825
commit 5f88fedee8

View File

@ -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
? {