session: load: replace fat state init with a faster one (goal is to make sure value listeners are up to date at init)
This commit is contained in:
parent
d2d3a4ab69
commit
69e11dfd47
1 changed files with 13 additions and 2 deletions
|
|
@ -4,7 +4,8 @@ var ipc = require('../ipc/'),
|
|||
editor = require('../editor/'),
|
||||
lobby = require('../ui/lobby'),
|
||||
{loading, icon, Popup} = require('../ui/utils'),
|
||||
{saveAs} = require('file-saver')
|
||||
{saveAs} = require('file-saver'),
|
||||
widgetManager = require('./widgets')
|
||||
|
||||
|
||||
var SessionManager = class SessionManager {
|
||||
|
|
@ -53,7 +54,17 @@ var SessionManager = class SessionManager {
|
|||
throw err
|
||||
}
|
||||
|
||||
state.set(state.get(), false)
|
||||
for (var h in widgetManager.widgets) {
|
||||
if (widgetManager.widgets[h].value !== undefined) {
|
||||
widgetManager.trigger('change', [{
|
||||
widget: widgetManager.widgets[h],
|
||||
id: widgetManager.widgets[h].getProp('id'),
|
||||
linkId: widgetManager.widgets[h].getProp('linkId'),
|
||||
options: {}
|
||||
}])
|
||||
}
|
||||
}
|
||||
|
||||
if (editor.enabled) editor.disable()
|
||||
|
||||
DOM.dispatchEvent(window, 'resize')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue