mirror of
https://github.com/zsviczian/obsidian-excalidraw-plugin.git
synced 2025-08-06 05:46:28 +00:00
replaced activeLeaf, added openInPopout
This commit is contained in:
@@ -163,13 +163,10 @@ export class ScriptEngine {
|
||||
name: `(Script) ${scriptName}`,
|
||||
checkCallback: (checking: boolean) => {
|
||||
if (checking) {
|
||||
return (
|
||||
this.plugin.app.workspace.activeLeaf.view.getViewType() ==
|
||||
VIEW_TYPE_EXCALIDRAW
|
||||
);
|
||||
return Boolean(app.workspace.getActiveViewOfType(ExcalidrawView));
|
||||
}
|
||||
const view = this.plugin.app.workspace.activeLeaf.view;
|
||||
if (view instanceof ExcalidrawView) {
|
||||
const view = app.workspace.getActiveViewOfType(ExcalidrawView);
|
||||
if (view) {
|
||||
(async()=>{
|
||||
const script = await this.plugin.app.vault.read(f);
|
||||
if(script) {
|
||||
|
||||
Reference in New Issue
Block a user