mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-01-24 18:00:45 +00:00
fix setIndex to include last item
This commit is contained in:
parent
075ca1049a
commit
16ff30a788
@ -2307,11 +2307,8 @@ Element.prototype.setIndex = function(index) {
|
||||
var i = this.parent.children.indexOf(this);
|
||||
if (!~i) return;
|
||||
|
||||
this.parent.children.splice(index, 0, this);
|
||||
|
||||
if (index <= i) i++;
|
||||
|
||||
this.parent.children.splice(i, 1);
|
||||
var item = this.parent.children.splice(i, 1)[0]
|
||||
this.parent.children.splice(index, 0, item);
|
||||
};
|
||||
|
||||
Element.prototype.setFront = function() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user