widgets: force all widgets to sync after session loading;

strip: remove getValue
editor: get if getValue exists before calling
This commit is contained in:
jean-emmanuel 2017-07-28 19:23:27 +02:00
parent f886132000
commit 76292fb1ef
3 changed files with 5 additions and 3 deletions

View file

@ -28,7 +28,7 @@ var updateDom = function(container,data, remote) {
wScroll = {}
for (let h of oldWidgets) {
if (widgetManager.widgets[h]) {
if (widgetManager.widgets[h] && widgetManager.widgets[h].getValue) {
wState[widgetManager.widgets[h].getProp('id')] = widgetManager.widgets[h].getValue()
}
}

View file

@ -2,7 +2,7 @@ var parser = require('./parser'),
parsewidgets = parser.widgets,
reset = parser.reset,
ui = require('./ui'),
{editorDisable} = require('./actions'),
{editorDisable, stateGet, stateSet} = require('./actions'),
editorInit = require('./editor/init'),
{loading, createPopup, icon} = require('./utils')
@ -32,6 +32,7 @@ module.exports = function(session,callback) {
return
}
stateSet(stateGet(), false)
$('#lobby').remove()
ui.init()
editorDisable()

View file

@ -50,7 +50,8 @@ module.exports = class Strip extends Panel {
this.container.addClass(this.getProp('horizontal') ? 'horizontal' : 'vertical')
this.container.addClass(this.getProp('stretch') ? 'stretch' : '')
delete this.setValue
this.setValue = undefined
this.getValue = undefined
}