Add chidren div in display
This commit is contained in:
parent
5096e5f129
commit
16dbfed977
1 changed files with 5 additions and 4 deletions
|
@ -1302,10 +1302,12 @@ class ForestDisplay {
|
|||
else
|
||||
children.sort(children[0].constructor.compare);
|
||||
|
||||
var $child_div = $('<div class="children"></div>');
|
||||
for (let child of children) {
|
||||
var $child = this.render_element(child, options);
|
||||
$container.append($child);
|
||||
$child_div.append($child);
|
||||
}
|
||||
$container.append($child_div);
|
||||
}
|
||||
|
||||
return $container;
|
||||
|
@ -1329,10 +1331,9 @@ class ForestDisplay {
|
|||
}
|
||||
|
||||
var $to_insert = this.render_element(first_missing, options);
|
||||
//TODO better placement
|
||||
if (existing) {
|
||||
this._$container.find('#'+existing.constructor.verbose_name+'-'+existing.id+'>:first-child')
|
||||
.after($to_insert);
|
||||
this._$container.find('#'+existing.constructor.verbose_name+'-'+existing.id+'>.children')
|
||||
.prepend($to_insert);
|
||||
} else {
|
||||
this._$container.prepend($to_insert);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue