fixed options problems...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-09-09 02:57:46 +03:00
parent 8553ca8594
commit e88edd4164

View File

@ -3008,7 +3008,7 @@ var BaseBrowserPrototype = {
// do not reconstruct the ones already present... // do not reconstruct the ones already present...
// XXX should from/to/around/count be a feature of this or of .walk(..)??? // XXX should from/to/around/count be a feature of this or of .walk(..)???
// XXX might be a good idea to use this.root === this instead of context.root === this // XXX might be a good idea to use this.root === this instead of context.root === this
//* /*
render: function(options, renderer, context){ render: function(options, renderer, context){
renderer = renderer || this renderer = renderer || this
context = renderer.renderContext(context) context = renderer.renderContext(context)
@ -3187,7 +3187,7 @@ var BaseBrowserPrototype = {
// - from/to/around/count support... // - from/to/around/count support...
// - ability to render separate items/sub-trees or lists of items... // - ability to render separate items/sub-trees or lists of items...
// ...pass the list to .walk(..), i.e. .walk(list/query, ...) // ...pass the list to .walk(..), i.e. .walk(list/query, ...)
// XXX revise how options are passed down the inlined/nested browsers... // XXX revise options handling...
// XXX doc... // XXX doc...
render: function(options, renderer){ render: function(options, renderer){
var that = this var that = this
@ -3207,13 +3207,16 @@ var BaseBrowserPrototype = {
args.pop() args.pop()
: 0 : 0
// XXX revise...
options = Object.assign( options = Object.assign(
Object.create(this.options || {}), Object.create(this.options || {}),
{ {
iterateNonIterable: true, iterateNonIterable: true,
includeInlinedBlocks: true, includeInlinedBlocks: true,
}, },
options || {}) // NOTE: we need to get all the keys from options, including
// inherited defaults...
Object.flatCopy(options || {}))
var render = renderer || this.__renderer__ var render = renderer || this.__renderer__
render = render.root == null ? render = render.root == null ?
@ -4131,11 +4134,9 @@ var updateElemClass = function(action, cls, handler){
// Renderer... // Renderer...
// XXX needs testing... // XXX needs testing...
// - structure seems to be fine... // - partial rendering...
// - rename .render(..) -> .render(..) and do a full test... // - local re-rendering...
// - problems: // - problems:
// - inlined/nested dialogs do not get button config...
// ...options not passed down correctly?
// - re-rendering loses focus... // - re-rendering loses focus...
// XXX doc... // XXX doc...
var HTMLRenderer = var HTMLRenderer =