mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
🐛 分屏
This commit is contained in:
parent
e38eea5f96
commit
5c27e916bc
2 changed files with 7 additions and 2 deletions
|
|
@ -262,6 +262,7 @@ export class Wnd {
|
||||||
// split to bottom
|
// split to bottom
|
||||||
const newWnd = targetWnd.split("tb");
|
const newWnd = targetWnd.split("tb");
|
||||||
newWnd.headersElement.append(oldTab.headElement);
|
newWnd.headersElement.append(oldTab.headElement);
|
||||||
|
newWnd.headersElement.parentElement.classList.remove("fn__none");
|
||||||
newWnd.moveTab(oldTab);
|
newWnd.moveTab(oldTab);
|
||||||
|
|
||||||
if (dragElement.style.bottom === "50%" && newWnd.element.previousElementSibling && targetWnd.element.parentElement) {
|
if (dragElement.style.bottom === "50%" && newWnd.element.previousElementSibling && targetWnd.element.parentElement) {
|
||||||
|
|
@ -272,6 +273,7 @@ export class Wnd {
|
||||||
// split to right
|
// split to right
|
||||||
const newWnd = targetWnd.split("lr");
|
const newWnd = targetWnd.split("lr");
|
||||||
newWnd.headersElement.append(oldTab.headElement);
|
newWnd.headersElement.append(oldTab.headElement);
|
||||||
|
newWnd.headersElement.parentElement.classList.remove("fn__none");
|
||||||
newWnd.moveTab(oldTab);
|
newWnd.moveTab(oldTab);
|
||||||
|
|
||||||
if (dragElement.style.right === "50%" && newWnd.element.previousElementSibling && targetWnd.element.parentElement) {
|
if (dragElement.style.right === "50%" && newWnd.element.previousElementSibling && targetWnd.element.parentElement) {
|
||||||
|
|
@ -288,6 +290,7 @@ export class Wnd {
|
||||||
}
|
}
|
||||||
if (targetWnd) {
|
if (targetWnd) {
|
||||||
targetWnd.headersElement.append(oldTab.headElement);
|
targetWnd.headersElement.append(oldTab.headElement);
|
||||||
|
targetWnd.headersElement.parentElement.classList.remove("fn__none");
|
||||||
targetWnd.moveTab(oldTab);
|
targetWnd.moveTab(oldTab);
|
||||||
resizeTabs();
|
resizeTabs();
|
||||||
}
|
}
|
||||||
|
|
@ -304,7 +307,7 @@ export class Wnd {
|
||||||
}
|
}
|
||||||
|
|
||||||
public switchTab(target: HTMLElement, pushBack = false, update = true) {
|
public switchTab(target: HTMLElement, pushBack = false, update = true) {
|
||||||
setPanelFocus(this.headersElement.parentElement);
|
setPanelFocus(this.headersElement.parentElement.parentElement);
|
||||||
let currentTab: Tab;
|
let currentTab: Tab;
|
||||||
this.children.forEach((item) => {
|
this.children.forEach((item) => {
|
||||||
if (target === item.headElement) {
|
if (target === item.headElement) {
|
||||||
|
|
@ -552,7 +555,7 @@ export class Wnd {
|
||||||
} else {
|
} else {
|
||||||
editors.forEach(item => {
|
editors.forEach(item => {
|
||||||
if (!item.element.classList.contains("fn__none")) {
|
if (!item.element.classList.contains("fn__none")) {
|
||||||
setPanelFocus(item.parent.parent.headersElement.parentElement);
|
setPanelFocus(item.parent.parent.headersElement.parentElement.parentElement);
|
||||||
updatePanelByEditor(item.editor.protyle, true, true);
|
updatePanelByEditor(item.editor.protyle, true, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,7 @@ const splitSubMenu = (tab: Tab) => {
|
||||||
click: () => {
|
click: () => {
|
||||||
const newWnd = tab.parent.split("lr");
|
const newWnd = tab.parent.split("lr");
|
||||||
newWnd.headersElement.append(tab.headElement);
|
newWnd.headersElement.append(tab.headElement);
|
||||||
|
newWnd.headersElement.parentElement.classList.remove("fn__none");
|
||||||
newWnd.moveTab(tab);
|
newWnd.moveTab(tab);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -146,6 +147,7 @@ const splitSubMenu = (tab: Tab) => {
|
||||||
click: () => {
|
click: () => {
|
||||||
const newWnd = tab.parent.split("tb");
|
const newWnd = tab.parent.split("tb");
|
||||||
newWnd.headersElement.append(tab.headElement);
|
newWnd.headersElement.append(tab.headElement);
|
||||||
|
newWnd.headersElement.parentElement.classList.remove("fn__none");
|
||||||
newWnd.moveTab(tab);
|
newWnd.moveTab(tab);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue