Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KodBox]Draw.io插件,在桌面模式里右键菜单新建的图表文件只会出现在桌面 #12

Open
zhtengw opened this issue May 13, 2020 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@zhtengw
Copy link
Owner

zhtengw commented May 13, 2020

KodBox中的Draw.io插件是在插件的main.js中调用kodApp.pathAction.newFile('drawio')函数来新建文件的。但有一个问题,在桌面模式中,不管打开哪个文件夹,通过kodApp.pathAction只能获取“桌面”路径的信息,没法得到文件夹的信息,导致新建文件始终只会出现在桌面,如gif所示:

深度录屏_Navigator_20200410192944

@zhtengw zhtengw added bug Something isn't working help wanted Extra attention is needed labels May 13, 2020
@zhtengw
Copy link
Owner Author

zhtengw commented May 13, 2020

不知道有没有其他新建文件的函数

@zhtengw zhtengw reopened this Jun 24, 2020
@zhtengw
Copy link
Owner Author

zhtengw commented Jun 24, 2020

8ea02b6 用以下判断来在桌面模式新建文件,确实可以在其他目录中新建了。但当打开多个目录窗口时,只能在最后打开的窗口中新建,其他目录窗口即使选中了也没用。仍未完善。

if(typeof(kodApp.root.pathAction)=="undefined"){ 
        kodApp.pathAction.newFile('drawio');
 } else {
        kodApp.root.pathAction.newFile('drawio');
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant