Skip to content

Commit

Permalink
Handle document fragments and layouts blocks properly in layout - ren…
Browse files Browse the repository at this point in the history
…der a layout
  • Loading branch information
Inviz committed Nov 9, 2011
1 parent e90155a commit dbf197a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Source/Module/Ambient/DOM.js
Expand Up @@ -345,10 +345,7 @@ var inserters = LSD.Module.DOM.inserters = {
Object.append(LSD.Module.DOM, {
setFragment: function(widget, fragment, element, bypass, before) {
if (fragment.childNodes) {
for (var i = 0, nodes = child.childNodes, j = nodes.length, result; i < j; i++) {
if (before) result = widget.insertBefore(nodes[i], before, element, bypass);
else result = widget.appendChild(nodes[i], element, bypass);
}
return widget.layout.render(fragment, [widget, element])
} else {
if (before) {
fragment.next = before;
Expand All @@ -359,10 +356,12 @@ Object.append(LSD.Module.DOM, {
fragment.widget = LSD.Module.DOM.find(before.parentNode);
fragment.element = before.parentNode;
}
} else {
fragment.widget = widget;
fragment.element = widget.toElement()
}
fragment.show();
fragment.attach();
}
return result;
},

dispose: function(node) {
Expand Down

0 comments on commit dbf197a

Please sign in to comment.