misc/demo/public/vendor/angular-ui-tree/angular-ui-tree.js
function (parent, siblings, index) {
                this.parent = parent;
                this.siblings = siblings.slice(0);

                // If source node is in the target nodes
                var i = this.siblings.indexOf(this.source);
                if (i > -1) {
                  this.siblings.splice(i, 1);
                  if (this.source.index() < index) {
                    index--;
                  }
                }

                this.siblings.splice(index, 0, this.source);
                this.index = index;
              }
function (parent, siblings, index) {
                this.parent = parent;
                this.siblings = siblings.slice(0);

                // If source node is in the target nodes
                var i = this.siblings.indexOf(this.source);
                if (i > -1) {
                  this.siblings.splice(i, 1);
                  if (this.source.index() < index) {
                    index--;
                  }
                }

                this.siblings.splice(index, 0, this.source);
                this.index = index;
              }
function ( parent , siblings , index ) { this . parent = parent ; this . siblings = siblings . slice ( 0 ) ; // If source node is in the target nodes var i = this . siblings . indexOf ( this . source ) ; if ( i > - 1 ) { this . siblings . splice ( i , 1 ) ; if ( this . source . index ( ) < index ) { index -- ; } } this . siblings . splice ( index , 0 , this . source ) ; this . index = index ; }
Move the node to a new position
Move the node to a new position