mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
c5f35969eb
commit
1310f5e8f9
2 changed files with 33 additions and 14 deletions
|
|
@ -26,6 +26,8 @@ import {openSearch} from "../search/spread";
|
|||
import {saveScroll} from "../protyle/scroll/saveScroll";
|
||||
import {pdfResize} from "../asset/renderAssets";
|
||||
import {Backlink} from "./dock/Backlink";
|
||||
import {openFileById} from "../editor/util";
|
||||
import {getSearch} from "../util/functions";
|
||||
|
||||
export const setPanelFocus = (element: Element) => {
|
||||
if (element.classList.contains("layout__tab--active") || element.classList.contains("layout__wnd--active")) {
|
||||
|
|
@ -296,6 +298,15 @@ export const JSONToLayout = (isStart: boolean) => {
|
|||
}
|
||||
});
|
||||
}
|
||||
// https://github.com/siyuan-note/siyuan/pull/7086
|
||||
const openId = getSearch("id", window.location.href)
|
||||
if (openId) {
|
||||
openFileById({
|
||||
id: getSearch("id", window.location.href),
|
||||
action: [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT],
|
||||
zoomIn: getSearch("focus", window.location.href) === "1"
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const layoutToJSON = (layout: Layout | Wnd | Tab | Model, json: any) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue