mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 23:50:13 +01:00
This commit is contained in:
parent
1488c86fc3
commit
f524918a7e
1 changed files with 3 additions and 3 deletions
|
|
@ -21,11 +21,11 @@ import {openFileById} from "../editor/util";
|
||||||
/// #endif
|
/// #endif
|
||||||
import {Constants} from "../constants";
|
import {Constants} from "../constants";
|
||||||
import {newFile} from "../util/newFile";
|
import {newFile} from "../util/newFile";
|
||||||
import {hasClosestByClassName} from "../protyle/util/hasClosest";
|
import {hasClosestByTag} from "../protyle/util/hasClosest";
|
||||||
import {deleteFiles} from "../editor/deleteFile";
|
import {deleteFiles} from "../editor/deleteFile";
|
||||||
|
|
||||||
export const initNavigationMenu = (liElement: HTMLElement) => {
|
export const initNavigationMenu = (liElement: HTMLElement) => {
|
||||||
const fileElement = hasClosestByClassName(liElement, "sy__file");
|
const fileElement = hasClosestByTag(liElement, "DIV");
|
||||||
if (!fileElement) {
|
if (!fileElement) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -142,7 +142,7 @@ export const initNavigationMenu = (liElement: HTMLElement) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const initFileMenu = (notebookId: string, pathString: string, liElement: Element) => {
|
export const initFileMenu = (notebookId: string, pathString: string, liElement: Element) => {
|
||||||
const fileElement = hasClosestByClassName(liElement, "sy__file");
|
const fileElement = hasClosestByTag(liElement, "DIV");
|
||||||
if (!fileElement) {
|
if (!fileElement) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue