fixed state export & tab selection in editor-root view

This commit is contained in:
jean-emmanuel 2016-02-29 11:33:40 +01:00
parent 881c050f12
commit 3ab01737a2
2 changed files with 3 additions and 3 deletions

View file

@ -18,10 +18,10 @@ module.exports = {
stateSave: function() {
state = module.exports.stateGet()
if (WEBFRAME) {
IPC.send('stateSave',STATE)
IPC.send('stateSave',state)
} else {
var down = $('<a download="'+new Date().toJSON().slice(0,10)+'_'+new Date().toJSON().slice(11,16)+'.preset"></a>')
var blob = new Blob([STATE],{type : 'text/plain'});
var blob = new Blob([state],{type : 'text/plain'});
down.attr('href', window.URL.createObjectURL(blob))
down[0].click()
}

View file

@ -449,7 +449,7 @@ module.exports.enable = function(){
.appendTo(list)
.click(function(){
var id = $('#container > .content > .tab').eq($(this).attr('data-index')).attr('id')
$(`a[data-tab="#${id}"]`).click()
$(`a[data-tab="#${id}"]`).trigger('mousedown.editor')
})
var remove = $('<span><i class="fa fa-remove"></i></span>')
.appendTo(item)