mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
This commit is contained in:
parent
1720630619
commit
a4ed45dc06
3 changed files with 24 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html style="position: fixed;top: 0;right: 0;left: 0;">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<!-- https://electronjs.org/docs/tutorial/security#csp-meta-tag
|
<!-- https://electronjs.org/docs/tutorial/security#csp-meta-tag
|
||||||
|
|
|
||||||
|
|
@ -199,6 +199,8 @@ ${this.position === "Top" ? "top" : "bottom"}:-${this.layout.element.clientHeigh
|
||||||
} else if (this.position === "Bottom") {
|
} else if (this.position === "Bottom") {
|
||||||
this.layout.element.style.bottom = -this.layout.element.clientHeight + "px";
|
this.layout.element.style.bottom = -this.layout.element.clientHeight + "px";
|
||||||
}
|
}
|
||||||
|
this.element.querySelector(".dock__item--activefocus")?.classList.remove("dock__item--activefocus");
|
||||||
|
this.layout.element.querySelector(".layout__tab--active")?.classList.remove("layout__tab--active");
|
||||||
}
|
}
|
||||||
|
|
||||||
public toggleModel(type: TDockType, show = false, close = false) {
|
public toggleModel(type: TDockType, show = false, close = false) {
|
||||||
|
|
|
||||||
|
|
@ -821,6 +821,27 @@ export const globalShortcut = () => {
|
||||||
window.siyuan.menus.menu.remove();
|
window.siyuan.menus.menu.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// dock float 时,点击空白处,隐藏 dock
|
||||||
|
const floatDockLayoutElement = hasClosestByClassName(event.target, "layout--float")
|
||||||
|
if (floatDockLayoutElement) {
|
||||||
|
if (!floatDockLayoutElement.isSameNode(window.siyuan.layout.topDock.layout.element)) {
|
||||||
|
window.siyuan.layout.topDock.hideDock();
|
||||||
|
}
|
||||||
|
if (!floatDockLayoutElement.isSameNode(window.siyuan.layout.bottomDock.layout.element)) {
|
||||||
|
window.siyuan.layout.bottomDock.hideDock();
|
||||||
|
}
|
||||||
|
if (!floatDockLayoutElement.isSameNode(window.siyuan.layout.leftDock.layout.element)) {
|
||||||
|
window.siyuan.layout.leftDock.hideDock();
|
||||||
|
}
|
||||||
|
if (!floatDockLayoutElement.isSameNode(window.siyuan.layout.rightDock.layout.element)) {
|
||||||
|
window.siyuan.layout.rightDock.hideDock();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
window.siyuan.layout.topDock.hideDock();
|
||||||
|
window.siyuan.layout.bottomDock.hideDock();
|
||||||
|
window.siyuan.layout.leftDock.hideDock();
|
||||||
|
window.siyuan.layout.rightDock.hideDock();
|
||||||
|
}
|
||||||
if (!hasClosestByClassName(event.target, "pdf__outer")) {
|
if (!hasClosestByClassName(event.target, "pdf__outer")) {
|
||||||
document.querySelectorAll(".pdf__util").forEach(item => {
|
document.querySelectorAll(".pdf__util").forEach(item => {
|
||||||
item.classList.add("fn__none");
|
item.classList.add("fn__none");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue