|
|
@ -24783,7 +24783,7 @@ BI.Layout = BI.inherit(BI.Widget, { |
|
|
|
this._children = {}; |
|
|
|
this._children = {}; |
|
|
|
BI.each(newCh, function (i, child) { |
|
|
|
BI.each(newCh, function (i, child) { |
|
|
|
var node = self._getOptions(child); |
|
|
|
var node = self._getOptions(child); |
|
|
|
var key = node.key == null ? i : node.key; |
|
|
|
var key = node.key == null ? self._getChildName(i) : node.key; |
|
|
|
children[key]._mount(); |
|
|
|
children[key]._mount(); |
|
|
|
self._children[self._getChildName(i)] = children[key]; |
|
|
|
self._children[self._getChildName(i)] = children[key]; |
|
|
|
}); |
|
|
|
}); |
|
|
@ -24801,7 +24801,7 @@ BI.Layout = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
function addNode (vnode, index) { |
|
|
|
function addNode (vnode, index) { |
|
|
|
var opt = self._getOptions(vnode); |
|
|
|
var opt = self._getOptions(vnode); |
|
|
|
var key = opt.key == null ? index : opt.key; |
|
|
|
var key = opt.key == null ? self._getChildName(index) : opt.key; |
|
|
|
return children[key] = self._addElement(key, vnode); |
|
|
|
return children[key] = self._addElement(key, vnode); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -24815,7 +24815,7 @@ BI.Layout = BI.inherit(BI.Widget, { |
|
|
|
function removeVnodes (vnodes, startIdx, endIdx) { |
|
|
|
function removeVnodes (vnodes, startIdx, endIdx) { |
|
|
|
for (; startIdx <= endIdx; ++startIdx) { |
|
|
|
for (; startIdx <= endIdx; ++startIdx) { |
|
|
|
var node = self._getOptions(vnodes[startIdx]); |
|
|
|
var node = self._getOptions(vnodes[startIdx]); |
|
|
|
var key = node.key == null ? startIdx : node.key; |
|
|
|
var key = node.key == null ? self._getChildName(startIdx) : node.key; |
|
|
|
children[key]._destroy(); |
|
|
|
children[key]._destroy(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -24823,9 +24823,9 @@ BI.Layout = BI.inherit(BI.Widget, { |
|
|
|
function insertBefore (insert, before, isNext, index) { |
|
|
|
function insertBefore (insert, before, isNext, index) { |
|
|
|
insert = self._getOptions(insert); |
|
|
|
insert = self._getOptions(insert); |
|
|
|
before = before && self._getOptions(before); |
|
|
|
before = before && self._getOptions(before); |
|
|
|
var insertKey = BI.isKey(insert.key) ? insert.key : index; |
|
|
|
var insertKey = BI.isKey(insert.key) ? insert.key : self._getChildName(index); |
|
|
|
if (before && children[before.key]) { |
|
|
|
if (before && children[before.key]) { |
|
|
|
var beforeKey = BI.isKey(before.key) ? before.key : index; |
|
|
|
var beforeKey = BI.isKey(before.key) ? before.key : self._getChildName(index); |
|
|
|
var next; |
|
|
|
var next; |
|
|
|
if (isNext) { |
|
|
|
if (isNext) { |
|
|
|
next = children[beforeKey].element.next(); |
|
|
|
next = children[beforeKey].element.next(); |
|
|
|