mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-02 02:40:15 +01:00
This commit is contained in:
parent
db95671a65
commit
2678009a22
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