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
|
else
|
||||||
children.sort(children[0].constructor.compare);
|
children.sort(children[0].constructor.compare);
|
||||||
|
|
||||||
|
var $child_div = $('<div class="children"></div>');
|
||||||
for (let child of children) {
|
for (let child of children) {
|
||||||
var $child = this.render_element(child, options);
|
var $child = this.render_element(child, options);
|
||||||
$container.append($child);
|
$child_div.append($child);
|
||||||
}
|
}
|
||||||
|
$container.append($child_div);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $container;
|
return $container;
|
||||||
|
@ -1329,10 +1331,9 @@ class ForestDisplay {
|
||||||
}
|
}
|
||||||
|
|
||||||
var $to_insert = this.render_element(first_missing, options);
|
var $to_insert = this.render_element(first_missing, options);
|
||||||
//TODO better placement
|
|
||||||
if (existing) {
|
if (existing) {
|
||||||
this._$container.find('#'+existing.constructor.verbose_name+'-'+existing.id+'>:first-child')
|
this._$container.find('#'+existing.constructor.verbose_name+'-'+existing.id+'>.children')
|
||||||
.after($to_insert);
|
.prepend($to_insert);
|
||||||
} else {
|
} else {
|
||||||
this._$container.prepend($to_insert);
|
this._$container.prepend($to_insert);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue