Refactoring: more es6 classes, manager objects (session/state/widgets), clean js input point, start cleaning the editor

This commit is contained in:
jean-emmanuel 2017-10-18 14:39:54 +02:00
parent b33e851c67
commit 9a9b1892da
42 changed files with 965 additions and 877 deletions

View file

@ -267,19 +267,6 @@ module.exports = {
})
},
stateLoad: function(data,clientId) {
dialog.showOpenDialog(window,{title:'Load preset file',defaultPath:settings.read('presetPath').replace(settings.read('presetPath').split('/').pop(),''),filters: [ { name: 'OSC Preset', extensions: ['preset'] }]},function(file){
if (file==undefined) {return}
settings.write('presetPath',file[0])
fs.readFile(file[0],'utf-8', function read(err, data) {
if (err) throw err
ipc.send('stateLoad',data,clientId)
})
})
},
fullscreen: function(data) {
window.setFullScreen(!window.isFullScreen())
},