mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-02 22:21:28 +08:00
This commit is contained in:
parent
7b5d58d5d3
commit
e8710da689
@ -20,6 +20,7 @@ import {App} from "../../index";
|
||||
import {Plugin} from "../../plugin";
|
||||
import {Custom} from "./Custom";
|
||||
import {recordBeforeResizeTop} from "../../protyle/util/resize";
|
||||
import {Constants} from "../../constants";
|
||||
|
||||
const TYPES = ["file", "outline", "inbox", "bookmark", "tag", "graph", "globalGraph", "backlink"];
|
||||
|
||||
@ -775,15 +776,14 @@ export class Dock {
|
||||
const sourceWnd = sourceDock.layout.children[parseInt(sourceElement.getAttribute("data-index"))] as Wnd;
|
||||
const sourceId = sourceElement.getAttribute("data-id");
|
||||
if (sourceId) {
|
||||
sourceWnd.removeTab(sourceElement.getAttribute("data-id"));
|
||||
sourceWnd.removeTab(sourceElement.getAttribute("data-id"), false, true, false);
|
||||
sourceElement.removeAttribute("data-id");
|
||||
}
|
||||
const hasActive = sourceElement.classList.contains("dock__item--active");
|
||||
if (hasActive) {
|
||||
sourceDock.toggleModel(type);
|
||||
sourceDock.toggleModel(type, false, false, false, false);
|
||||
}
|
||||
delete sourceDock.data[type];
|
||||
|
||||
// 目标处理
|
||||
sourceElement.setAttribute("data-index", index.toString());
|
||||
if (previousType) {
|
||||
@ -801,7 +801,10 @@ export class Dock {
|
||||
if (hasActive) {
|
||||
this.toggleModel(type, true, false, false, false);
|
||||
}
|
||||
// 保存布局需等待动画完毕 https://github.com/siyuan-note/siyuan/issues/13507
|
||||
setTimeout(() => {
|
||||
saveLayout();
|
||||
}, Constants.TIMEOUT_TRANSITION);
|
||||
}
|
||||
|
||||
public remove(key: TDock | string) {
|
||||
|
Loading…
Reference in New Issue
Block a user