@@ -29,6 +29,10 @@ ipcMain.on("colchanged", function (e, d) {
2929 mainWindow . webContents . send ( "colchanged" , d ) ;
3030} )
3131
32+ ipcMain . on ( "exportAll" , function ( e , d ) {
33+ mainWindow . webContents . send ( "exportAll" , d ) ;
34+ } )
35+
3236
3337ipcMain . on ( 'checkClose' , function ( eg , d ) {
3438 mainWindow . destroy ( ) ;
@@ -53,11 +57,7 @@ app.on('ready', function () {
5357 protocol : 'file:' ,
5458 slashes : true
5559 } ) ) ;
56- // if (!app.isPackaged) mainWindow.webContents.openDevTools();
57- // mainWindow.webContents.openDevTools();
58- // mainWindow.on('closed', function(){
59- // app.quit();
60- // })
60+
6161 mainWindow . on ( 'close' , function ( e ) {
6262 e . preventDefault ( ) ;
6363 mainWindow . webContents . send ( 'checkClose' , 'isCloseAble' ) ;
@@ -127,7 +127,6 @@ const helpMenu = {
127127 click ( ) {
128128 var childWindow = new BrowserWindow ( {
129129 icon : path . join ( __dirname , 'figs/charts.png' ) ,
130- // resizable : false,
131130 minWidth : 500 ,
132131 maxWidth : 700 ,
133132 width :600 ,
@@ -242,11 +241,9 @@ const homeMenuTemplate = [
242241 if ( mainWindow != window ) window . close ( )
243242 } )
244243 var men = Menu . getApplicationMenu ( ) ;
245- for ( let i of [ 'save' , 'saveas' , 'tfs' , 'tpl' , '3dview' , "spr" , 'af' , 'arf' , 'pax ' , 'swapen' , "edat" , "fill" , "filter" , 'rgft' , 'lmfit' ] ) {
244+ for ( let i of [ 'save' , 'saveas' , 'tfs' , 'tpl' , '3dview' , "spr" , 'af' , 'arf' , 'tax ' , 'swapen' , "edat" , "fill" , "filter" , 'rgft' , 'lmfit' ] ) {
246245 men . getMenuItemById ( i ) . enabled = false ;
247246 }
248- men . getMenuItemById ( "pax" ) . visible = true ;
249- men . getMenuItemById ( 'pay' ) . visible = false ;
250247 mainWindow . reload ( ) ;
251248 }
252249 } ,
@@ -266,34 +263,21 @@ const homeMenuTemplate = [
266263 label : "View" ,
267264 submenu : [
268265 {
269- label : "Plot along X" ,
270- accelerator : 'CmdOrCtrl+W' ,
271- id : 'pax' ,
272- visible : true ,
273- enabled : false ,
274- click ( ) {
275- Menu . getApplicationMenu ( ) . getMenuItemById ( "pax" ) . visible = false ;
276- Menu . getApplicationMenu ( ) . getMenuItemById ( "pay" ) . visible = true ;
277- mainWindow . webContents . send ( "menuTrigger" , "pa" ) ;
278- }
279- } , {
280- label : 'Plot along Y' ,
281- accelerator : 'CmdOrCtrl+W' ,
282- id : 'pay' ,
283- visible : false ,
284- click ( ) {
285- Menu . getApplicationMenu ( ) . getMenuItemById ( "pax" ) . visible = true ;
286- Menu . getApplicationMenu ( ) . getMenuItemById ( "pay" ) . visible = false ;
287- mainWindow . webContents . send ( "menuTrigger" , "pa" ) ;
288- }
289- } , {
290266 label : 'Open Plot Settings' ,
291267 accelerator : 'CmdOrCtrl+K' ,
292268 id : 'tfs' ,
293269 enabled : false ,
294270 click ( ) {
295271 mainWindow . webContents . send ( "menuTrigger" , "pdash" )
296272 }
273+ } , {
274+ label : "Toggle Axis" ,
275+ accelerator : 'CmdOrCtrl+W' ,
276+ id : 'tax' ,
277+ enabled : false ,
278+ click ( ) {
279+ mainWindow . webContents . send ( "menuTrigger" , "tax" ) ;
280+ }
297281 } , {
298282 label : 'Toggle Plot List' ,
299283 accelerator : 'CmdOrCtrl+B' ,
0 commit comments