mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-23 23:44:06 +01:00
This commit is contained in:
parent
42dc3712c1
commit
ddfaf6bdba
5 changed files with 27 additions and 4 deletions
|
|
@ -124,6 +124,9 @@ const openFile = (options: IOpenFileOptions) => {
|
|||
if ((jsonObj.children.rootId && jsonObj.children.rootId === options.rootID) ||
|
||||
(jsonObj.children.path && jsonObj.children.path === options.assetPath)) {
|
||||
item.focus();
|
||||
if (options.assetPath) {
|
||||
item.webContents.executeJavaScript(`window.newWindow.positionPDF("${options.assetPath}", ${typeof options.page === "number" ? options.page : `"${options.page}"`})`);
|
||||
}
|
||||
hasOpen = true;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue