editor: don't save null scroll states

This commit is contained in:
jean-emmanuel 2018-10-18 10:59:09 +02:00
parent fa9d7eaab0
commit 6c8f1e0bd5

View file

@ -32,7 +32,10 @@ function updateWidget(widget, options={}) {
if (valueProp !== '' && valueProp !== undefined) stateManager.pushValueOldProp(id, valueProp)
}
if (widgetManager.scrollingWidgets.indexOf(w.hash) > -1 && w.scroll) {
scrollState[w.getProp('id')] = w.scroll()
var s = w.scroll()
if (s[0] !== 0 || s[1] !== 0) {
scrollState[w.getProp('id')] = s
}
}
}