breadcrumb

This commit is contained in:
Vanessa 2023-09-30 19:55:01 +08:00
parent f608da26a5
commit 1f2faecf4d
3 changed files with 40 additions and 7 deletions

View file

@ -181,7 +181,6 @@ const editKeydown = (app: App, event: KeyboardEvent) => {
return false;
}
} else if (!protyle) {
const models = getAllModels();
if (!protyle && range) {
window.siyuan.blockPanels.find(item => {
item.editors.find(editorItem => {
@ -195,6 +194,7 @@ const editKeydown = (app: App, event: KeyboardEvent) => {
}
});
}
const models = getAllModels();
if (!protyle) {
models.backlink.find(item => {
if (item.element.classList.contains("layout__tab--active")) {

View file

@ -1,4 +1,4 @@
import {getAllModels} from "../../layout/getAll";
import {getAllEditor, getAllModels} from "../../layout/getAll";
import {isWindow} from "../../util/functions";
import {hasClosestBlock, hasClosestByClassName, hasClosestByMatchTag} from "../../protyle/util/hasClosest";
import {getColIndex} from "../../protyle/util/table";
@ -36,12 +36,12 @@ export const windowMouseMove = (event: MouseEvent & { target: HTMLElement }, mou
coordinates.screenY = event.screenY;
if (window.siyuan.hideBreadcrumb) {
document.querySelectorAll(".protyle-breadcrumb__bar--hide").forEach(item => {
item.classList.remove("protyle-breadcrumb__bar--hide");
});
window.siyuan.hideBreadcrumb = false;
getAllModels().editor.forEach(item => {
item.editor.protyle.breadcrumb.render(item.editor.protyle, true);
getAllEditor().forEach(item => {
if (item.protyle.breadcrumb.element.classList.contains("protyle-breadcrumb__bar--hide")) {
item.protyle.breadcrumb.element.classList.remove("protyle-breadcrumb__bar--hide");
item.protyle.breadcrumb.render(item.protyle, true);
}
});
}
if (!mouseIsEnter &&