소스 검색

Operation name Bug fix

naibo 2 년 전
부모
커밋
8c418d10f3
3개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 3 3
      ElectronJS/main.js
  2. 1 1
      ElectronJS/src/taskGrid/FlowChart.js
  3. 1 1
      ElectronJS/src/taskGrid/FlowChart_CN.js

+ 3 - 3
ElectronJS/main.js

@@ -107,13 +107,13 @@ async function beginInvoke(msg) {
             flowchart_window.loadURL(url);
         }
         mainWindow.hide();
-        const window = windowManager.getActiveWindow();
         // Prints the currently focused window bounds.
-        console.log(window);
         // This method has to be called on macOS before changing the window's bounds, otherwise it will throw an error.
         // It will prompt an accessibility permission request dialog, if needed.
-        if(!process.platform == "linux" && !process.platform == "darwin"){
+        if(process.platform != "linux" && process.platform != "darwin"){
             const {windowManager} = require("node-window-manager");
+            const window = windowManager.getActiveWindow();
+            console.log(window);
             windowManager.requestAccessibility();
             // Sets the active window's bounds.
             let size = screen.getPrimaryDisplay().workAreaSize

+ 1 - 1
ElectronJS/src/taskGrid/FlowChart.js

@@ -271,7 +271,7 @@ function addElement(op, para) {
     if (option == 1) { //打开网页选项
         title = "Open Page";
     } else {
-        title = $(".options")[option - 2].innerHTML; //获取新增操作名称
+        title = $(".options")[option - 1].innerHTML; //获取新增操作名称
     }
 
     toolBoxKernel(null, para);

+ 1 - 1
ElectronJS/src/taskGrid/FlowChart_CN.js

@@ -271,7 +271,7 @@ function addElement(op, para) {
     if (option == 1) { //打开网页选项
         title = "打开网页";
     } else {
-        title = $(".options")[option - 2].innerHTML; //获取新增操作名称
+        title = $(".options")[option - 1].innerHTML; //获取新增操作名称
     }
 
     toolBoxKernel(null, para);