Blocks.prototype.remove = function()

in src/lib/vpsc.js [272:284]


    Blocks.prototype.remove = function (b) {
        /* DEBUG
                    console.log("remove block: " + b.blockInd);
                    console.assert(this.contains(b));
        DEBUG */
        var last = this.list.length - 1;
        var swapBlock = this.list[last];
        this.list.length = last;
        if (b !== swapBlock) {
            this.list[b.blockInd] = swapBlock;
            swapBlock.blockInd = b.blockInd;
        }
    };