Fixed being able to drag an item after the "show more" area

This commit is contained in:
jos 2018-05-07 20:55:39 +02:00
parent 10a2447caa
commit 92a431e37d
1 changed files with 8 additions and 1 deletions

View File

@ -693,8 +693,15 @@ Node.prototype.moveBefore = function(node, beforeNode) {
}
if (beforeNode instanceof AppendNode) {
// the this.childs.length + 1 is to reckon with the node that we're about to add
if (this.childs.length + 1 > this.maxVisibleChilds) {
var lastVisibleNode = this.childs[this.maxVisibleChilds - 1];
this.insertBefore(node, lastVisibleNode);
}
else {
this.appendChild(node);
}
}
else {
this.insertBefore(node, beforeNode);
}