mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
🚨
This commit is contained in:
parent
c538c0a9e3
commit
52e1cc7957
7 changed files with 12 additions and 12 deletions
|
|
@ -801,7 +801,7 @@ export class Wnd {
|
|||
}
|
||||
tab.parent = this;
|
||||
resizeTabs();
|
||||
hideAllElements(["toolbar"])
|
||||
hideAllElements(["toolbar"]);
|
||||
}
|
||||
|
||||
public split(direction: TDirection) {
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@ export class Files extends Model {
|
|||
}
|
||||
}
|
||||
if (gutterType && newElement.classList.contains("dragover")) {
|
||||
const gutterTypes = gutterType.replace(Constants.SIYUAN_DROP_GUTTER, "").split(Constants.ZWSP)
|
||||
const gutterTypes = gutterType.replace(Constants.SIYUAN_DROP_GUTTER, "").split(Constants.ZWSP);
|
||||
if (["nodelistitem", "nodeheading"].includes(gutterTypes[0])) {
|
||||
// 块标拖拽
|
||||
if (gutterTypes[0] === "nodeheading") {
|
||||
|
|
|
|||
|
|
@ -30,19 +30,19 @@ export class Dock {
|
|||
this.layout = window.siyuan.layout.layout.children[0].children[0] as Layout;
|
||||
this.resizeElement = this.layout.element.nextElementSibling as HTMLElement;
|
||||
this.layout.element.classList.add("layout__dockl");
|
||||
this.layout.element.insertAdjacentHTML("beforeend", `<div class="layout__dockresize layout__dockresize--lr"></div>`);
|
||||
this.layout.element.insertAdjacentHTML("beforeend", "<div class=\"layout__dockresize layout__dockresize--lr\"></div>");
|
||||
break;
|
||||
case "Right":
|
||||
this.layout = window.siyuan.layout.layout.children[0].children[2] as Layout;
|
||||
this.resizeElement = this.layout.element.previousElementSibling as HTMLElement;
|
||||
this.layout.element.classList.add("layout__dockr");
|
||||
this.layout.element.insertAdjacentHTML("beforeend", `<div class="layout__dockresize layout__dockresize--lr"></div>`);
|
||||
this.layout.element.insertAdjacentHTML("beforeend", "<div class=\"layout__dockresize layout__dockresize--lr\"></div>");
|
||||
break;
|
||||
case "Bottom":
|
||||
this.layout = window.siyuan.layout.layout.children[1] as Layout;
|
||||
this.resizeElement = this.layout.element.previousElementSibling as HTMLElement;
|
||||
this.layout.element.classList.add("layout__dockb");
|
||||
this.layout.element.insertAdjacentHTML("beforeend", `<div class="layout__dockresize"></div>`);
|
||||
this.layout.element.insertAdjacentHTML("beforeend", "<div class=\"layout__dockresize\"></div>");
|
||||
break;
|
||||
}
|
||||
this.element = document.getElementById("dock" + options.position);
|
||||
|
|
@ -121,7 +121,7 @@ export class Dock {
|
|||
documentSelf.onmousemove = (moveEvent: MouseEvent) => {
|
||||
moveEvent.preventDefault();
|
||||
moveEvent.stopPropagation();
|
||||
let currentNowSize
|
||||
let currentNowSize;
|
||||
if (this.position === "Left") {
|
||||
currentNowSize = (currentSize + (moveEvent.clientX - x));
|
||||
} else if (this.position === "Right") {
|
||||
|
|
@ -424,7 +424,7 @@ export class Dock {
|
|||
if (anotherIndex === 0) {
|
||||
anotherWnd.element.nextElementSibling.classList.remove("fn__none");
|
||||
} else {
|
||||
lastWnd = anotherWnd
|
||||
lastWnd = anotherWnd;
|
||||
anotherWnd.element.previousElementSibling.classList.remove("fn__none");
|
||||
}
|
||||
const lastActiveElement = this.element.querySelector('.dock__item--active[data-index="1"]');
|
||||
|
|
|
|||
|
|
@ -509,7 +509,7 @@ export const resizeTabs = () => {
|
|||
});
|
||||
});
|
||||
pdfResize();
|
||||
hideAllElements(["gutter"])
|
||||
hideAllElements(["gutter"]);
|
||||
}, 200);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -63,4 +63,4 @@ export const hideAllElements = (types: string[]) => {
|
|||
item.innerHTML = "";
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -813,7 +813,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
const ids = event.dataTransfer.getData(Constants.SIYUAN_DROP_FILE).split(",");
|
||||
for (let i = 0; i < ids.length; i++) {
|
||||
if (ids[i]) {
|
||||
const response = await fetchSyncPost("/api/filetree/doc2Heading", {
|
||||
await fetchSyncPost("/api/filetree/doc2Heading", {
|
||||
srcID: ids[i],
|
||||
after: targetElement.classList.contains("dragover__bottom"),
|
||||
targetID: targetElement.getAttribute("data-node-id"),
|
||||
|
|
|
|||
|
|
@ -825,10 +825,10 @@ export const globalShortcut = () => {
|
|||
}
|
||||
// protyle.toolbar 点击空白处时进行隐藏
|
||||
if (!hasClosestByClassName(event.target, "protyle-toolbar")) {
|
||||
hideAllElements(["toolbar"])
|
||||
hideAllElements(["toolbar"]);
|
||||
}
|
||||
if (!hasClosestByClassName(event.target, "pdf__outer")) {
|
||||
hideAllElements(["pdfutil"])
|
||||
hideAllElements(["pdfutil"]);
|
||||
}
|
||||
// dock float 时,点击空白处,隐藏 dock
|
||||
const floatDockLayoutElement = hasClosestByClassName(event.target, "layout--float", true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue