mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-27 10:46:09 +01:00
This commit is contained in:
parent
b120e66ca9
commit
88ece2c1ec
3 changed files with 39 additions and 14 deletions
|
|
@ -97,7 +97,7 @@ export const globalShortcut = () => {
|
|||
}
|
||||
|
||||
if (event.clientX < 43) {
|
||||
if (!window.siyuan.layout.leftDock.pin) {
|
||||
if (!window.siyuan.layout.leftDock.pin && window.siyuan.layout.leftDock.layout.element.clientWidth > 0) {
|
||||
if (event.clientY > document.getElementById("toolbar").clientHeight + document.getElementById("dockTop").clientHeight &&
|
||||
event.clientY < window.innerHeight - document.getElementById("status").clientHeight - document.getElementById("dockBottom").clientHeight) {
|
||||
if (!hasClosestByClassName(event.target as HTMLElement, "b3-menu") &&
|
||||
|
|
@ -111,7 +111,7 @@ export const globalShortcut = () => {
|
|||
}
|
||||
}
|
||||
} else if (event.clientX > window.innerWidth - 41) {
|
||||
if (!window.siyuan.layout.rightDock.pin) {
|
||||
if (!window.siyuan.layout.rightDock.pin && window.siyuan.layout.rightDock.layout.element.clientWidth > 0) {
|
||||
if (event.clientY > document.getElementById("toolbar").clientHeight + document.getElementById("dockTop").clientHeight &&
|
||||
event.clientY < window.innerHeight - document.getElementById("status").clientHeight - document.getElementById("dockBottom").clientHeight) {
|
||||
if (!hasClosestByClassName(event.target as HTMLElement, "layout--float") && window.siyuan.layout.rightDock.layout.element.style.opacity !== "1") {
|
||||
|
|
@ -125,13 +125,13 @@ export const globalShortcut = () => {
|
|||
}
|
||||
|
||||
if (event.clientY < 75) {
|
||||
if (!window.siyuan.layout.topDock.pin && window.siyuan.layout.topDock.layout.element.style.opacity !== "1") {
|
||||
if (!window.siyuan.layout.topDock.pin && window.siyuan.layout.topDock.layout.element.clientHeight > 0 && window.siyuan.layout.topDock.layout.element.style.opacity !== "1") {
|
||||
window.siyuan.layout.topDock.layout.element.style.top = (document.getElementById("dockTop").clientHeight + document.getElementById("toolbar").clientHeight + .5) + "px";
|
||||
window.siyuan.layout.topDock.layout.element.style.opacity = "1";
|
||||
}
|
||||
} else if (event.clientY > window.innerHeight - 73) {
|
||||
if (!window.siyuan.layout.bottomDock.pin && window.siyuan.layout.bottomDock.layout.element.style.opacity !== "1") {
|
||||
window.siyuan.layout.bottomDock.layout.element.style.bottom = (document.getElementById("dockBottom").clientHeight + document.getElementById("status").clientHeight + .5) + "px";
|
||||
if (!window.siyuan.layout.bottomDock.pin && window.siyuan.layout.bottomDock.layout.element.clientHeight > 0 && window.siyuan.layout.bottomDock.layout.element.style.opacity !== "1") {
|
||||
window.siyuan.layout.bottomDock.layout.element.style.bottom = (document.getElementById("dockBottom").clientHeight + document.getElementById("status").clientHeight + 1) + "px";
|
||||
window.siyuan.layout.bottomDock.layout.element.style.opacity = "1";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue