mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
This commit is contained in:
parent
a58642b0da
commit
c3f651b6c9
3 changed files with 14 additions and 2 deletions
|
|
@ -2,7 +2,7 @@ import {Layout} from "./index";
|
|||
import {genUUID} from "../util/genID";
|
||||
import {
|
||||
getInstanceById,
|
||||
getWndByLayout,
|
||||
getWndByLayout, JSONToCenter,
|
||||
newCenterEmptyTab,
|
||||
resizeTabs,
|
||||
setPanelFocus,
|
||||
|
|
@ -297,7 +297,11 @@ export class Wnd {
|
|||
const targetWndElement = event.target.parentElement.parentElement;
|
||||
const targetWnd = getInstanceById(targetWndElement.getAttribute("data-id")) as Wnd;
|
||||
const tabId = event.dataTransfer.getData(Constants.SIYUAN_DROP_TAB);
|
||||
const oldTab = getInstanceById(tabId) as Tab;
|
||||
let oldTab = getInstanceById(tabId) as Tab;
|
||||
if (isWindow() && !oldTab) { // 从主窗口拖拽到页签新窗口
|
||||
JSONToCenter(JSON.parse(event.dataTransfer.getData(Constants.SIYUAN_DROP_TABTOWINDOW)), this);
|
||||
oldTab = this.children[this.children.length - 1];
|
||||
}
|
||||
if (oldTab.model instanceof Asset) {
|
||||
// https://github.com/siyuan-note/siyuan/issues/6890
|
||||
const pdfViewerElement = oldTab.model.element.querySelector("#viewerContainer");
|
||||
|
|
@ -636,6 +640,9 @@ export class Wnd {
|
|||
}
|
||||
});
|
||||
}
|
||||
/// #if !BROWSER
|
||||
setTabPosition();
|
||||
/// #endif
|
||||
return;
|
||||
}
|
||||
if (item.headElement) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue